Setting a 3 limit counter then kicking the player...
#7

Quote:
Originally Posted by Kasichok
Посмотреть сообщение
PHP код:
//OnPlayerStateChange
new str[15];
    
warnings[playerid] ++;
    
format(str15"%d/3 warnings"warnings[playerid]);
    if(
warnings[playerid] > 2) { SetTimerEx("PKick"100false"d"playerid); Kick(playerid); }
    
RemovePlayerFromVehicle(playerid);
    
SendClientMessage(playerid, -1"Hunter can only be used by VIP players.");
 
///////////////////////////////////////////////////////////////////////////////////////////
forward PKick(playerid);
public 
PKick(playerid)
{
    
Kick(playerid);
    return 
1;

If you're adding a timer it's not for nothing, why are you still calling Kick function directly inside the if statement?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)