Jump to content

[PAWN] - sistem series - Anti C-Bug


FnZ
 Share

Recommended Posts

ANTI C-Bug system



Acest sistem este facut pentru a il implementa in server-ul pe care il aveti, sper ca v-am oferit o mana de ajutor pentru cei ce cautau aceast sistem (ma rog mini sistem), sper sa va placa.



Pentru acest sistem avem nevoie de callback-ul OnPlayerKeyStateChange



Sistemul:



public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (oldkeys == KEY_FIRE && newkeys == KEY_CROUCH)
{
new weapon = GetPlayerWeapon(playerid); //Luam ID-ul armei
if(weapon == 24) //puenti voi alte id-uri de arme aici daca vreti
{
SetPlayerArmedWeapon(playerid, 0);
GameTextForPlayer(playerid, "~w~Is forbiden to do ~r~C-Bug.", 1000, 1);
}
}
return 1;
}

Edited by FnZ
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.