command(promote, playerid, params[])
{
new target, string[128];
if(PlayerInfo[playerid][pRank] == 7)
{
if(sscanf(params,"ui", target)) return SendClientMessage(playerid, GREY, "SYNTAX:{FFFFFF} /promote [ID]");
{
PlayerInfo[target][pRank] = 1;
format(string, sizeof(string), "NOTE: You have promoted %s", RPName(target));
SendClientMessage(playerid, ADMINBLUE, string);
format(string, sizeof(string), "NOTE: You have been promoted to rank %d ", RPName(playerid), PlayerInfo[playerid][pRank]);
SendClientMessage(target, ADMINBLUE, string);
}
}
else
{
RemoveTextMessage(playerid);
TextDrawShowForPlayer(playerid, Text:CantCommand);
SetTimerEx("CantCommand", 3500, false, "d", playerid);
}
return 1;
}
PlayerInfo[target][pRank] += 1;
|
Try doing this
PHP код:
|