Guest User

sstk

a guest
Nov 10th, 2009
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. public OnFilterScriptInit()
  4. {
  5. print(" Anti-Driveby succesfuly loaded.");
  6. return 1;
  7. }
  8.  
  9. public OnFilterScriptExit()
  10. {
  11. return 1;
  12. }
  13.  
  14. new PlayerWeapon[MAX_PLAYERS][12];
  15. new PlayerWeaponAmmo[MAX_PLAYERS][12];
  16.  
  17. public OnPlayerStateChange(playerid, newstate, oldstate)
  18. {
  19. if (newstate==PLAYER_STATE_DRIVER){
  20. for(new i=0;i<12;i++){
  21. GetPlayerWeaponData(playerid, i, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
  22. }
  23. ResetPlayerWeapons(playerid);
  24. }
  25. if (newstate==PLAYER_STATE_ONFOOT && oldstate==PLAYER_STATE_DRIVER){
  26. for(new i=0;i<12;i++){
  27. GivePlayerWeapon(playerid, PlayerWeapon[playerid][i], PlayerWeaponAmmo[playerid][i]);
  28. }
  29. }
  30. return 1;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment