06.08.2017, 01:24
(
Последний раз редактировалось eSPeZet; 06.08.2017 в 21:38.
)
Hello,
I tried to create a /kick command with a timer for a delayed kick.
Scriptlines:
The weird thing is that i can change the Kick and Callback function to WHATEVER I want...the Server STILL recognizes WHO to kick and I really wonder WHY and HOW? I can paste parameters which I did not even DEFINE and the Server kicks the proper ID.
Example:
and it would STILL kick the right player..
I tried to create a /kick command with a timer for a delayed kick.
Scriptlines:
Код:
dcmd_kick(playerid, params[]) { if(IsPlayerAdmin(playerid)) { new pid, reason[128], name[MAX_PLAYER_NAME], done[128]; if(sscanf(params, "uz", pid, reason)) { SendClientMessage(playerid, rot, "ERROR: /kick [ID/Name] [Grund]"); } if(pid == INVALID_PLAYER_ID) { SendClientMessage(playerid, rot, "ERROR: Spieler ist nicht online."); } else if(pid == playerid) { SendClientMessage(playerid, rot, "Du kannst dich nicht selbst kicken."); } else { GetPlayerName(pid, name, sizeof(name)); format(done, sizeof(done), "%s wurde gekickt. Grund: %s", name, reason); SendClientMessage(playerid, rot, done); SetTimer("KickTimer", 500, false); } } else { SendClientMessage(playerid, rot, "Error: Du bist kein Admin!"); } return 1; } public KickTimer(pid) { Kick(pid); }
Example:
Код:
forward(yoo); public KickTimer(yoo) { Kick(yoo); }