15.08.2008, 18:11
pawn Код:
if(strcmp(cmd, "/promote", true) ==0 )
{
if(PLAYERLIST_authed[playerid] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /promote [id]");
return 1;
}
new para1 = ReturnUser(tmp);
new faction;
if(PlayerInfo[playerid][pMember] == faction)
{
if(PLAYERLIST_authed[para1] == 1)
{
if(PlayerInfo[para1][pMember] == faction)
{
PlayerInfo[para1][pRank] ++;
new string[256];
format(string, sizeof(string), ".: %s has been promoted by %s. Rank %d :.", GetName(para1),GetName(playerid),PlayerInfo[para1][pRank]);
SendClientMessage(playerid, COLOR_ADMIN_TP, string);
OnPlayerFactionSpawn(playerid);
}
}
}
}
return 1;
}