Guest User

-=-=-=Simple VehLock-=-=

a guest
Sep 9th, 2012
811
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.87 KB | None | 0 0
  1. #define FILTERSCRIPT
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5.  
  6. #if defined FILTERSCRIPT
  7.  
  8. #define SetCarLockedState SetVehicleParamsForPlayer
  9. #define ERROR 0xAA3333AA
  10. #define SUCCESS 0xFFFF00AA
  11.  
  12. public OnFilterScriptInit()
  13. {
  14.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=");
  15.     print("-=-=-=-=-=-[Simple Car Lock System]-=-=-=-=-=");
  16.     print("-=-=-=-=-=-[By: [p3]pr0t0typ3]=-=-=-=");
  17.     return 1;
  18. }
  19.  
  20. public OnFilterScriptExit()
  21. {
  22.     return 1;
  23. }
  24.  
  25. #else
  26.  
  27. main()
  28. {
  29.     print("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=");
  30.     print("-=-=-=-=-=-[Simple Car Lock System]-=-=-=-=-=");
  31.     print("-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=");
  32. }
  33.  
  34. #endif
  35.  
  36. public OnGameModeInit()
  37. {
  38.     return 1;
  39. }
  40.  
  41. public OnGameModeExit()
  42. {
  43.     return 1;
  44. }
  45.  
  46. CMD:lockveh(playerid, params[])
  47. {
  48.     #pragma unused params
  49.     if(IsPlayerAdmin(playerid))//remove me for NON rcon support
  50.     {//remove me for NON rcon support
  51.         if(IsPlayerInAnyVehicle(playerid))
  52.         {
  53.              for(new i = 0; i < MAX_PLAYERS; i++)
  54.              SetCarLockedState(GetPlayerVehicleID(playerid),i,false,true);
  55.              SendClientMessage(playerid,SUCCESS,"Your car has been locked!");
  56.              return 1;
  57.         }
  58.         else return SendClientMessage(playerid,ERROR,"ERROR: You need to be in a vehicle");
  59.     }
  60.     else return SendClientMessage(playerid,ERROR,"ERROR: You are not logged into RCON.");
  61. }
  62.  
  63. CMD:unlockveh(playerid, params[])
  64. {
  65.     #pragma unused params
  66.     if(IsPlayerAdmin(playerid)) {//remove me for NON rcon support
  67.         if(IsPlayerInAnyVehicle(playerid))
  68.         {
  69.             for(new i = 0; i < MAX_PLAYERS; i++)
  70.             SetCarLockedState(GetPlayerVehicleID(playerid),i,false,false);
  71.             SendClientMessage(playerid,SUCCESS,"Your car has been unlocked!");
  72.             return 1;
  73.         }
  74.         else return SendClientMessage(playerid,ERROR,"ERROR: You need to be in a vehicle to unlock the doors");
  75.     }
  76.     else return SendClientMessage(playerid,ERROR,"ERROR: You are not logged into RCON.");
  77. }
Advertisement
Add Comment
Please, Sign In to add comment