14.01.2012, 19:18
pawn Код:
forward EngineOn(playerid);
public EngineOn(playerid)
{
if(EngineStartStatus[playerid] == 3)
{
GameTextForPlayer(playerid, "~g~Engine Starting...", 1000, 5);
EngineStartStatus[playerid] --;
}
if(EngineStartStatus[playerid] == 2)
{
GameTextForPlayer(playerid, "~g~Engine Starting..", 1000, 5);
EngineStartStatus[playerid] --;
}
if(EngineStartStatus[playerid] == 1)
{
EngineStartStatus[playerid] = 1;
KillTimer(engineon);
GameTextForPlayer(playerid, "~g~Engine Started.", 1000, 5);
new vehicleid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
}
return 1;
}
Also, take:
pawn Код:
new vehicleid = GetPlayerVehicleID(playerid);
if(EngineStartStatus[playerid] == 1)
{
GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
SetVehicleParamsEx(vehicleid, 1, lights, alarm, doors, bonnet, boot, objective);
}