24.04.2014, 11:24
hi
how do i set this OnVehicleSpawn
Every vehicle spawn the vehicle engine is 0
and Every time when player enter a car and if the vehicle engine is 0 it will send a message like this:
"Your vehicle engine is not turned on! type /car engine if you used to turn on"
TY
how do i set this OnVehicleSpawn
Every vehicle spawn the vehicle engine is 0
and Every time when player enter a car and if the vehicle engine is 0 it will send a message like this:
"Your vehicle engine is not turned on! type /car engine if you used to turn on"
Код:
else if(strcmp(params, "engine", true) == 0 && IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new vehicle = GetPlayerVehicleID(playerid); new string[126]; new engine, lights, alarm, doors, bonnet, boot, objective; GetVehicleParamsEx(vehicle, engine, lights, alarm, doors, bonnet, boot, objective); if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(Engine[vehicle] == 0) { Engine[vehicle] = 1; SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective); format(string, sizeof(string), "* %s turns the engine of their vehicle engine on.", GetPlayerNameEx(playerid)); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } else { Engine[vehicle] = 0; SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective); format(string, sizeof(string), "* %s turns the vehicles engine off.", GetPlayerNameEx(playerid)); ProxDetector(20.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE); return 1; } } return engine; }