Kick is dominant
#8

Kickedid variable isn't necessary and also you created a global variable instead of a player variable. You can simply do that below and also just noticed that you are using a global timer, why are you seriously using a global timer?

PHP код:
dcmd_kick(playeridparams[])
{
    new 
pidreason[128], name[MAX_PLAYER_NAME], done[128];
    if(
sscanf(params"uz"pidreason)) return SendClientMessage(playeridrot"ERROR: /kick [ID/Name] [Grund]");
    
GetPlayerName(pidnamesizeof(name));
    
format(donesizeof(done), "%s wurde gekickt. Grund: %s"namereason);
    
SendClientMessage(playeridrotdone);
    
SetTimerEx("KickTimer"500false"i"pid);
    return 
1;
}

forward KickTimer(playerid);
public 
KickTimer(playerid)
{
     
Kick(playerid);

So all you need to do is to add this under the kick cmd.
PHP код:
SetTimerEx("KickTimer"500false"i"pid); 
And add this anywhere.
PHP код:
forward KickTimer(playerid);
public 
KickTimer(playerid)
{
     
Kick(playerid);

No need to make a variable and even if you made a variable, atleast make a per player variable not global variable and you shouldn't really make a global timer, like seriously.
Reply


Messages In This Thread
Kick is dominant - by eSPeZet - 02.08.2017, 19:51
Re: Kick is dominant - by grymtn - 02.08.2017, 19:57
Re: Kick is dominant - by eSPeZet - 02.08.2017, 20:04
Re: Kick is dominant - by grymtn - 02.08.2017, 20:13
Re: Kick is dominant - by eSPeZet - 02.08.2017, 20:21
Re: Kick is dominant - by Crystallize - 02.08.2017, 20:24
Re: Kick is dominant - by grymtn - 02.08.2017, 20:26
Re: Kick is dominant - by TopShooter2 - 02.08.2017, 20:28
Re: Kick is dominant - by eSPeZet - 02.08.2017, 20:41
Re: Kick is dominant - by Vince - 02.08.2017, 20:55

Forum Jump:


Users browsing this thread: 1 Guest(s)