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

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;

Seems to work pretty well, the only issue now is the "%d/ 3 warnings"
It doesn't display anything.

Thanks a ton though for trying to help me. rep+!
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)