Engin cmd makes my pawno stopped working
#1

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;
}
Reply


Messages In This Thread
Engin cmd makes my pawno stopped working - by Jassey - 04.10.2012, 09:48
Re: Engin cmd makes my pawno stopped working - by gtakillerIV - 04.10.2012, 09:51
Re: Engin cmd makes my pawno stopped working - by Scrillex - 04.10.2012, 09:51
Re: Engin cmd makes my pawno stopped working - by mamorunl - 04.10.2012, 09:52
Re: Engin cmd makes my pawno stopped working - by Jassey - 04.10.2012, 10:08
Re: Engin cmd makes my pawno stopped working - by Scrillex - 04.10.2012, 10:20

Forum Jump:


Users browsing this thread: 2 Guest(s)