Weird timer-parameter
#13

Quote:
Originally Posted by eSPeZet
Посмотреть сообщение
Hello,

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);
}
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:

Код:
forward(yoo);
public KickTimer(yoo)
{
	Kick(yoo);
}
and it would STILL kick the right player..
Nice I Hope You Continue Your Work
Reply


Messages In This Thread
Weird timer-parameter - by eSPeZet - 06.08.2017, 01:24
Re: Weird timer-parameter - by NewFreeroamStunt - 06.08.2017, 01:41
Re: Weird timer-parameter - by eSPeZet - 06.08.2017, 01:53
Re: Weird timer-parameter - by ISmokezU - 06.08.2017, 02:31
Re: Weird timer-parameter - by eSPeZet - 06.08.2017, 02:38
Re: Weird timer-parameter - by eSPeZet - 06.08.2017, 21:18
Re: Weird timer-parameter - by Misiur - 06.08.2017, 21:22
Re: Weird timer-parameter - by Misiur - 06.08.2017, 21:27
Respuesta: Weird timer-parameter - by ThiagoMikael - 06.08.2017, 21:28
Re: Weird timer-parameter - by eSPeZet - 06.08.2017, 21:33
Re: Weird timer-parameter - by Kane - 06.08.2017, 21:51
Re: Weird timer-parameter - by Misiur - 06.08.2017, 21:53
Re: Weird timer-parameter - by Nehe - 06.08.2017, 21:53
Re: Weird timer-parameter - by eSPeZet - 06.08.2017, 21:57
Re: Weird timer-parameter - by BlackBank - 06.08.2017, 23:46
Re: Weird timer-parameter - by eSPeZet - 07.08.2017, 01:43

Forum Jump:


Users browsing this thread: 5 Guest(s)