08.05.2010, 03:01
pawn Код:
new Name2[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name2,sizeof(Name2));
if(strcmp("/pawning", cmdtext, true) == 0)
i
{
{
f((strcmp(Name2, "PawninG_Teste", true) == 0))
{
SendClientMessage(playerid,COLOR_GREY,"Somente PawninG Teste pode usar esse comando!");
return 1;
}
GetPlayerName(playerid,sendername,sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid,COLOR_GRAD2,"USE: (/pawning [texto]");
return 1;
}
format(string,sizeof(string),"Admin: %s: %s",sendername,result);
SendClientMessageToAll(COLOR_RED,string);
}
return 1;
}