01/08/2023 14:59
(01/08/2023 14:42)xbruno1000x Escreveu: Anti C-Bug:
Na OnPlayerMakeCBug você define a consequência.Código:#include <a_samp>
forward OnPlayerMakeCBug(playerid);
public OnPlayerMakeCBug(playerid)
{
Kick(playerid);
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_FIRE && oldkeys & KEY_CROUCH && IsCbugWeapon(playerid))
{
CallLocalFunction("OnPlayerMakeCBug", "i", playerid);
}
return 1;
}
stock IsCbugWeapon(playerid)
{
new weaponID = GetPlayerWeapon(playerid);
if(weaponID == 22 || weaponID == 24 || weaponID == 25 || weaponID == 27)
{
return 1;
}
return 0;
}
Muito obrigado Bruno,ajudou dms mn tmj
Programador de Samp (ainda iniciante,mas futuramente grande)