Jump to content

Question

4 answers to this question

Recommended Posts

Posted

[pawn]

if(PlayerInfo[playerid][Level] >= 1)

{

          new messagetext[512];

  format(messagetext, 512, ""W"(ID:%d)"COL_YELLOW"[ADMIN]: %s", playerid, text);

  SendPlayerMessageToAll(playerid, messagetext);

  return 0;

}

[/pawn]

[glow=blue,2,300]SAMP.[glow=yellow,2,300]RSP-GAME[glow=red,2,300].NET[/glow][/glow][/glow]

Posted

Nu am fost sigur ce doresti asa ca ti-am raspuns la ambele variante la care m-am gandit.

Sa apara [ADMIN] in localchat trebuie sa pui la if(realchat) functia:

[pawn]if(PlayerInfo[playerid][pAdmin] > 0)

{

GetPlayerName(playerid, sendername, sizeof(sendername));

format(string, sizeof(string), "[ADMIN]%s Says: %s", sendername, text);

ProxDetector(20.0, playerid, string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);

}[/pawn]

Iar pentru a 2a problema credeam ca vrei un chat pentru admini asa uite unul:

[pawn] if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0)

{

    if(IsPlayerConnected(playerid))

    {

GetPlayerName(playerid, sendername, sizeof(sendername));

new length = strlen(cmdtext);

while ((idx < length) && (cmdtext[idx] <= ' '))

{

idx++;

}

new offset = idx;

new result[256];

while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))

{

result[idx - offset] = cmdtext[idx];

idx++;

}

result[idx - offset] = EOS;

if(!strlen(result))

{

SendClientMessage(playerid, COLOR_OOC, Foloseste (/a)dmin);

return 1;

}

format(string, sizeof(string), "%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);

if (PlayerInfo[playerid][pAdmin] >= 1)

{

SendAdminMessage(COLOR_YELLOW2, string);

}

printf("Admin %s: %s", sendername, result);

}

return 1;

}[/pawn]

ps: trebuie sa definesti culoarea:

#define COLOR_YELLOW2  0xF5DEB3AA

Posted

cockin data viitoare ai pastebin.com

Lasa patebinul pentru un script asa mic.

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.