Advertisement
Guest User

Anti C-Bug System.

a guest
Jan 2nd, 2015
3,822
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. forward OnPlayerMakeCBug(playerid);
  4.  
  5. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  6. {
  7. if(newkeys & KEY_FIRE && oldkeys & KEY_CROUCH && IsCbugWeapon(playerid))
  8. {
  9. CallLocalFunction("OnPlayerMakeCBug", "i", playerid);
  10. }
  11. return 1;
  12. }
  13.  
  14. stock IsCbugWeapon(playerid)
  15. {
  16. new weaponID = GetPlayerWeapon(playerid);
  17. if(weaponID == 22 || weaponID == 24 || weaponID == 25 || weaponID == 27)
  18. {
  19. return 1;
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement