Guest User

mascii

a guest
Mar 13th, 2009
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. // mascii's simple anti-vehicle FS
  2.  
  3. #include <a_samp>
  4. #define FILTERSCRIPT
  5. #define COLOR_GREY 0xAFAFAFAA
  6.  
  7. new antiv;
  8. //0 = off
  9. //1 = on
  10.  
  11. public OnFilterScriptInit()
  12. {
  13. antiv = 1;
  14. return 1;
  15. }
  16.  
  17. public OnPlayerStateChange(playerid, newstate, oldstate)
  18. {
  19. if(newstate == PLAYER_STATE_PASSENGER || PLAYER_STATE_DRIVER)
  20. {
  21. if (antiv == 0)
  22. {
  23. RemovePlayerFromVehicle(playerid);
  24. }
  25. }
  26. return 1;
  27. }
  28.  
  29. public OnPlayerCommandText(playerid, cmdtext[])
  30. {
  31. if(strcmp(cmdtext, "/antiv on", true) == 0)
  32. {
  33. if (IsPlayerAdmin(playerid) == 1)
  34. {
  35. SendClientMessageToAll(COLOR_GREY,"Admin has turned the use of Vehicles on");
  36. antiv = 1;
  37. }
  38. return 1;
  39. }
  40. if(strcmp(cmdtext, "/antiv off", true) == 0)
  41. {
  42. if (IsPlayerAdmin(playerid) == 1)
  43. {
  44. SendClientMessageToAll(COLOR_GREY,"Admin has turned the use of Vehicles off");
  45. antiv = 0;
  46. }
  47. return 1;
  48. }
  49. return 0;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment