PDA

View Full Version : [Tutorial]Anti C bug [0.2v]



Anafu*
17-11-2015, 08:21 PM
SALUT,va voi prezenta o metoda simpla de a opri C-bug-ul prin cel mai usor mod.

1.Cautati in gamemode
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{

}

2.apoi vom adauga urmatorul cod la OnPlayerKeyStateChange.

if ((oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH))
{
new weapon = GetPlayerWeapon(playerid);
if(weapon == 24) // weapon == 24 este deagle , daca vreti sa se blocheze c-bugul si la alte arme faceti in felul urmator: if(weapon == 24 || weapon == id la arma )
{
ApplyAnimation(playerid,"GYMNASIUM","gym_tread_falloff",1.0,0,0,0,0,0);
GameTextForPlayer(playerid, "~r~Stop c-bug !", 5000, 1); // in loc de Stop C-bug , scrieti ce vreti voi.
}
}

3. Codul Complet:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if ((oldkeys & KEY_FIRE) && (newkeys & KEY_CROUCH))
{
new weapon = GetPlayerWeapon(playerid);
if(weapon == 24) // weapon == 24 este deagle , daca vreti sa se blocheze c-bugul si la alte arme faceti in felul urmator: if(weapon == 24 || weapon == id la arma )
{
ApplyAnimation(playerid,"GYMNASIUM","gym_tread_falloff",1.0,0,0,0,0,0);
GameTextForPlayer(playerid, "~r~Stop c-bug !", 5000, 1); // in loc de Stop C-bug , scrieti ce vreti voi.
}
}

}

Enjoy,daca v-a fost de folos nu ezitati sa apasati butonul de +1.
Cu drag Anafu;)