Advertisement
Guest User

NOS disabler

a guest
Feb 28th, 2016
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.72 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new removeNOS[MAX_PLAYERS];
  4. public OnPlayerConnect(playerid)
  5. {
  6.     removeNOS[playerid] = 0;
  7.     return 1;
  8. }
  9.  
  10. public OnVehicleMod(playerid, vehicleid, componentid)
  11. {
  12.     if(componentid == 1008 || componentid == 1009 || componentid == 1010)
  13.     {
  14.         SendClientMessage(playerid, -1, "NOS is currently disabled.");
  15.         removeNOS[playerid] = componentid;
  16.         return 0;
  17.     }
  18.    
  19.     return 1;
  20. }
  21.  
  22. public OnEnterExitModShop(playerid, enterexit, interiorid)
  23. {
  24.     if(removeNOS[playerid])
  25.     {
  26.         if(GetVehicleComponentInSlot(GetPlayerVehicleID(playerid), CARMODTYPE_NITRO) == removeNOS[playerid])
  27.             RemoveVehicleComponent(GetPlayerVehicleID(playerid), removeNOS[playerid]), removeNOS[playerid] = 0;
  28.     }
  29.    
  30.     return 1;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement