Weird timer-parameter
#4

Well in theory

You're setting the timer to kick the target (pid) So that's why. If you replaced pid with playerid, it will kick the player using the command not the person he/she is trying to kick

PHP код:
dcmd_kick(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridrot"Error: Du bist kein Admin!");
    new 
pidreason[128], name[MAX_PLAYER_NAME], done[128];
    if(
sscanf(params"uz"pidreason)) return SendClientMessage(playeridrot"ERROR: /kick [ID/Name] [Grund]");
    if(
pid == INVALID_PLAYER_ID) return SendClientMessage(playeridrot"ERROR: Spieler ist nicht online.");
    if(
pid == playerid) return SendClientMessage(playeridrot"Du kannst dich nicht selbst kicken.");
    
GetPlayerName(pidnamesizeof(name));
    
format(donesizeof(done), "%s wurde gekickt. Grund: %s"namereason);
    
SendClientMessage(playeridrotdone);
    
SetTimerEx("KickTimer"500false"i"pid);//
    
return 1;
}

forward KickTimer(pid);
public 
KickTimer(pid)
{
    
Kick(pid);
    return 
true;

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: 2 Guest(s)