29.06.2013, 20:12
I want to make a 1 second delay when player get's kicked, but i don't won't to find all Kick functions and change them to something else. Is there any way to redefine already defined kick function?
//this inside your /kick comamnd.
SetTimerEx("kick",1000,false,"i",targetid); //i use that because i dont know what you define the target as
//remove the Kick(targetid); from the function all together
forward kick(targetid);
public kick(targetid)
{
Kick(targetid);
return 1;
}
timer KickPlayerDelay[150](playerid)
{
Kick(playerid);
}
stock rKick(playerid)
{
defer KickPlayerDelay(playerid);
return playerid;
}
#if defined _ALS_Kick
#undef Kick
#else
#define _ALS_Kick
#endif
#define Kick rKick