28.02.2014, 16:47
I'd love it if you guys could help me out with how to display a message to a player shortly before he is kicked from the server. I've made a kick command, but I realized it kicks the player before he gets the message that he's supposed to get.
Cheers!
Код:
CMD:kick(playerid,params[]) { if(PlayerInfo[playerid][Level] < 1) return SendClientMessage(playerid,0xF69521AA, "You can't use this command!");//Checking if the player has admin level 1, if not it sends him a message. new id;//Creating a variable to store the selected id; if(sscanf(params,"u",id)) return SendClientMessage(playerid,0xF69521AA,"USAGE: /kick <id>");//Checking if the player has selected an id, other wise it sends him a message. We used the "u" specifier, because he can put a name or an id. if(!IsPlayerConnected(id)) return SendClientMessage(playerid, 0xF69521AA,"That player is not connected!");//Checking if the selected user is connected or not. SendClientMessage(playerid,0xF69521AA,"You have successfully kicked the selected user from La Ville De L'Isle Roleplay!"); Kick(id); return 1; }