04.10.2012, 09:48
I want to make cmd /engin to turn on/off the engine of vehicles, but i found a problem while i compile the script. The pawno was stopped cause that.
Код:
CMD:engine(playerid, params[]) { if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid; vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 481 || GetVehicleModel(vehicleid) == 509 || GetVehicleModel(vehicleid) == 510) return SendClientMessageEx(playerid,COLOR_WHITE,"Command tersebut tidak dapat digunakan ke kendaraan ini."); GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective); if(engine == VEHICLE_PARAMS_ON) { SetVehicleEngine(vehicleid, playerid); } else if((engine == VEHICLE_PARAMS_OFF || engine == VEHICLE_PARAMS_UNSET)) { SendClientMessageEx(playerid, COLOR_WHITE, "Sedang menyalakan mesin, harap tunggu..."); SetTimerEx("SetVehicleEngine", 1000, 0, "dd", vehicleid, playerid); } } return 1; }