20.11.2011, 13:08
I'm trying to test my engine command and it doesnt matter that my vehicle health is full (1000)
The engine still doesnt start :/
The engine still doesnt start :/
pawn Код:
public TurnOnEngine(playerid, vehicle2)
{
new Float:health;
new vehicleid = GetPlayerVehicleID(playerid);
new vehhealth = GetVehicleHealth(vehicleid, health);
if(vehhealth >= 0 && vehhealth <= 250)
{
new sendername[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Engine didn't start ((%s)) ", sendername);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
return 1;
}
else
{
if(Vehicle3[vehicle2][Engine] == 0)
{
// GameTextForPlayer(playerid,"~W~Engine turned ~g~On",3000,1);
//TogglePlayerControllable(playerid, true);
new sendername[MAX_PLAYER_NAME];
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "Engine started ((%s)) ", sendername);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
Vehicle3[vehicle2][Engine] = 1;
SetVehicleParamsEx(GetPlayerVehicleID(playerid),1,lights,alarm,doors,bonnet,boot,objective);
}
}
return true;
}