13.06.2013, 02:33
pawn Код:
if(strcmp(cmd, "/lc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pPosto] < 5)
{
SendClientMessage(playerid, COLOR_GREY, "Vocк nгo й um Lider.");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[51];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
CheckText(playerid,result);
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /lc [Texto]");
return 1;
}
if(strlen(result) >= 50) { SendClientMessage(playerid,COLOR_GREY,"O mбximo de caracteres й de 50."); return 1; }
new Fala[100];
if(PlayerInfo[playerid][pPosto] == 5)
{
format(Fala,sizeof(Fala),"Sub Lнder %s, %s: %s",NomeORG(playerid),sendername,result);
for(new Ele=0; Ele<MAX_PLAYERS; Ele++)
{
if(PlayerInfo[Ele][pPosto] > 4)
{
SendClientMessage(Ele,COLOR_YELLOW2,Fala);
}
}
}
if(PlayerInfo[playerid][pPosto] == 6)
{
format(Fala,sizeof(Fala),"Lнder %s, %s: %s",NomeORG(playerid),sendername,result);
for(new Ele=0; Ele<MAX_PLAYERS; Ele++)
{
if(PlayerInfo[Ele][pPosto] > 4)
{
SendClientMessage(Ele,COLOR_YELLOW2,Fala);
}
}
}
}
return 1;
}
Crйditos ~> Biel_COP