Display message before being kicked
#1

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.

Код:
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;
}
Cheers!
Reply
#2

https://sampwiki.blast.hk/wiki/Kick
Reply
#3

Actually, sorry for being such a retard, haha, but that wasn't really the problem. The problem is that the admin doesn't receive the "You have successfully kicked the selected user from La Ville De L'Isle Roleplay" message when he kicks a player. I've got no idea what I meant in the actual post, I'm sorry.

P.S: Thank you Doreto, though, for giving me that link. I bet it'll come handy when I make some other admin commands.
Reply
#4

Anyone? How can I make the admin that kicked the player receive the "You have successfully kicked the selected user from La Ville De L'Isle Roleplay" message? I don't quite see the problem in my script.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)