16.07.2018, 10:21
Adicione a variavel no нnicio do GM.
Coloque na public OnPlayerKeyStateChange
Criar as forwards
PHP код:
new AvisoCBUG[MAX_PLAYERS];
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);
}
}
}
PHP код:
forward DescongelarCBUG(playerid);
public DescongelarCBUG(playerid)
{
TogglePlayerControllable(playerid,1);
SetPVarInt(playerid, "IsFrozen", 1);
}
forward AntiCBug(playerid);
public AntiCBug(playerid)
{
AvisoCBUG[playerid] = 0;
}