11.12.2014, 16:44
Hello, so I got this command where I set the players VIP level and I am wondering how can I make it so for me, the admin, sends a message notifying me that "You gave VIP level 1, 2 or 3 to "ID" player.
Here is the command:
Here is the command:
Код:
CMD:setvip(playerid, params[]) { if(IsPlayerAdmin(playerid)) { new string[125], level, player1; if(sscanf(params,"dd",player1, level)) return SendClientMessage(playerid, RED,"[USAGE]: /setvip ( playerid ) ( level )"); if(!IsPlayerConnected(playerid) && player1 != INVALID_PLAYER_ID) { SendClientMessage(playerid, RED,"[ERROR]: Player is not connected"); } if(level > MAX_VIPL) { SendClientMessage(playerid, RED,"[ERROR]: Incorrect level"); } else { format(string, sizeof(string),""cblue"Administrator "cgreen"'%s' "cblue"has set your vip level to "cgreen"'%d'", PlayerName(playerid),level); SendClientMessage(player1, PURPLE, string); PlayerPlaySound(player1,1057,0.0,0.0,0.0); PlayerInfo[player1][pVIP] = level; } } else return SendClientMessage(playerid, RED,"[ERROR]: You need to be RCON admin to use this command"); return 1; }