02.08.2017, 19:51
Hello guys
I am new here and quite a beginner in pawn.
I am trying to create a kick command and BEFORE the player gets kicked I want him to see a message.
The problem is that the message which SHOULD be shown, doesn't show up, BUT gets kicked.
And YES I did pay attention to put the line which shows the person the message ABOVE the kick-function.
Here is my code:
And yes I am aware, that i can kick myself. This is wanted because I have no test-subject.
I am new here and quite a beginner in pawn.
I am trying to create a kick command and BEFORE the player gets kicked I want him to see a message.
The problem is that the message which SHOULD be shown, doesn't show up, BUT gets kicked.
And YES I did pay attention to put the line which shows the person the message ABOVE the kick-function.
Here is my code:
Код:
dcmd_kick(playerid, params[]) { new pid, reason[128], name[MAX_PLAYER_NAME], done[128]; if(sscanf(params, "uz", pid, reason)) return SendClientMessage(playerid, rot, "ERROR: /kick [ID/Name] [Grund]"); GetPlayerName(pid, name, sizeof(name)); format(done, sizeof(done), "%s wurde gekickt. Grund: %s", name, reason); SendClientMessage(pid, rot, done); Kick(pid); return 1; }