Show a dialog after being kicked
#1

I've seen it in other servers, is there any script that I can add to a filterscript so that when I /kick someone it shows a dialog on there screen saying "You have been kicked by "blah blah" Reason: blah. If it's possible, could someone please create me a small script to add on the end to make it do that, or please give me an idea. Thanks in advanced!
Reply
#2

This is simple, you just need to use the ShowPlayerDialog BEFORE you actually 'kick' the player.
Example:
pawn Код:
ShowPlayerDialog(targetid, DIALOG_KICK, ...
Kick(targetid);
The above code would work, HOWEVER:
pawn Код:
Kick(targetid);
ShowPlayerDialog(targetid, DIALOG_KICK, ...
might not work... so just give that a shot.
Reply
#3

In your 'kick' command, just use format to get the reason string and the admin who kicked him and send it through ShowPlayerDialog.. Something like, example:
pawn Код:
new st[128];
format(st, sizeof(st), "You have been kicked from the server by %s for, REASON: %s", GetName(targetid), GetName(playerid));
//assuming targetid is the player who is getting kicked, and playerid the one executing it, and GetName is the function to get a player's name!
Reply
#4

Thank you so much!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)