#1

Код:
As of SA-MP 0.3x, any action taken directly before Kick() (such as sending a message with SendClientMessage) will not reach the player. A timer must be used to delay the kick.
If i for ex: killtimer before kick this mean timer don't get killed? or this is just that for function where i use playerid?

KillTimer(..):
Kick(playerid);
Reply
#2

PHP код:
SetTimerEx("KickTimer"10false"i"playerid);

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

No needing to kill timers.
Reply
#3

I don't see why you would ever need to kill the timer just before your kick is processed. If you had some cause to not kick them after a command was typed you would just need to exit the command before kick is ever called.
Reply
#4

You don't kill non-looping or small delay timers.
You only kill non-looping timers when they have a big delay.

A timer with atleast 200 miliseconds would do the job.
Reply
#5

Guys he is probably talking about something else.
The above quote from the SAMP wiki says, that all player-related functions (SendClientMessage, SetPlayerHealth) etc will not be executed for the kicked player.
The functions are actually always executed like normal before kicking, just that the kicked player cannot receive any messages from the queue after the server closed the connection (The messages will probably get dumped when kicking).

Normal functions are still executed like normal, so yea, you can kill a timer just before kicking someone.
If I got you wrong and you want to kill the timer kicking someone, I don't see a point except you want a "fast-paced kick-revoke system".
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)