26.02.2011, 22:04
I did it for you
I hope that i have helped
pawn Код:
if(strcmp("/giverespect", cmd, true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_LIGHTRED,"USAGE: /giverespect [id]");
return 1;
}
new id = strval(tmp);
new pid = playerid;
if(!IsPlayerConnected(id))
{
SendClientMessage(playerid,0x778899FF,"Server: This player is not online!");
return 1;
}
if (PlayerInfo[id][gPlayerAccount] < 400)
{
new amsg[100];
new victimid[MAX_PLAYERS];
GetPlayerName(id, victimid, sizeof(victimid));
format(amsg,sizeof(amsg),"Server: You have given %s one respect point!",victimid);
SendClientMessage(pid,COLOR_LIGHTBLUE,amsg);
PlayerInfo[id][gPlayerAccount]++;
return 1;
}
else
{
SendClientMessage(pid,0x778899FF,"Server: This player already haves too many permissons (over 400)!");
}
}
return 1;
}