[Ajuda] C-BUG
#3

Adicione a variavel no нnicio do GM.

PHP код:
new AvisoCBUG[MAX_PLAYERS]; 
Coloque na public OnPlayerKeyStateChange

PHP код:
if(AvisoCBUG[playerid] == 1)
        {
            
SCM(playerid,-1,"Nгo faзas c-bug, ficas congelado por 3 segundos.");
            
TogglePlayerControllable(playerid,0);
            
SetPVarInt(playerid"IsFrozen"0);
            
SetTimerEx("DescongelarCBUG",3000,false,"d",playerid);
            
AvisoCBUG[playerid] = 0;
        }
if(
newkeys == KEY_HANDBRAKE)
    {
        if(
IsPlayerInAnyVehicle(playerid)) return 1;
        if(
GetPlayerWeapon(playerid) > 20)
        {
            if(
AvisoCBUG[playerid] == 0)
            {
                
AvisoCBUG[playerid] = 1;
                
SetTimerEx("AntiCBug",1000,false,"d",playerid);
            }
        }
    } 
Criar as forwards

PHP код:
forward DescongelarCBUG(playerid);
public  
DescongelarCBUG(playerid)
{
    
TogglePlayerControllable(playerid,1);
    
SetPVarInt(playerid"IsFrozen"1);
}
forward AntiCBug(playerid);
public 
AntiCBug(playerid)
{
    
AvisoCBUG[playerid] = 0;

Reply


Messages In This Thread
C-BUG - by JoelNyiTz - 16.07.2018, 01:08
Re: C-BUG - by ipsLuan - 16.07.2018, 01:17
Re: C-BUG - by Koplan - 16.07.2018, 10:21
Re: C-BUG - by JoelNyiTz - 16.07.2018, 13:26

Forum Jump:


Users browsing this thread: 1 Guest(s)