Advertisement
Guest User

Untitled

a guest
Jul 30th, 2016
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. if(newkeys & KEY_YES) IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
  2. {
  3. new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
  4. vehicleid = GetPlayerVehicleID(playerid);
  5. if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510 || DynVeh[vehicleid] != -1 && DynVehicleInfo[DynVeh[vehicleid]][gv_iType] == 1 && GetVehicleModel(vehicleid) == 592) return SendClientMessageEx(playerid,COLOR_WHITE,"This command can't be used in this vehicle.");
  6. GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
  7. if(engine == VEHICLE_PARAMS_ON)
  8. {
  9. SetVehicleEngine(vehicleid, playerid);
  10. format(string, sizeof(string), "{FF8000}** {C2A2DA}%s turns the key in the ignition and the engine stops.", GetPlayerNameEx(playerid, 1));
  11. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  12. }
  13. else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET))
  14. {
  15. if (GetPVarInt(playerid, "Refueling")) return SendClientMessageEx(playerid, COLOR_WHITE, "You can't do this while refueling.");
  16. format(string, sizeof(string), "{FF8000}** {C2A2DA}%s turns the key in the ignition and the engine starts.", GetPlayerNameEx(playerid, 1));
  17. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  18. SendClientMessageEx(playerid, COLOR_WHITE, "Vehicle engine starting, please wait...");
  19. SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement