if(strcmp(cmd, "/engineon", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(vehid != INVALID_VEHICLE_ID)
{
if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
{
GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
EngineStatus[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "{2F991A}Upalio {FFFFFF}si vozilo!");
format(string, sizeof(string), "* %s je upalio vozilo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
}
}
else
{
SendClientMessage(playerid, 0x00FF00FF, "{E31919}Nisi u vozilu!");
}
return 1;
}
if(strcmp(cmd, "/engineoff", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid))
{
if(vehid != INVALID_VEHICLE_ID)
{
if(EngineStatus[playerid] == 1)
{
GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
EngineStatus[GetPlayerVehicleID(playerid)] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "{E31919}Ugasio {FFFFFF}si vozilo!");
format(string, sizeof(string), "* %s je ugasio vozilo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
}
}
else
{
SendClientMessage(playerid, 0x00FF00FF, "{E31919}Nisi u vozilu!");
}
return 1;
}
Hello,I have problem with engine system..When i sit on BMX i must turn engine on...How to remove that..Pls Help..
pawn Код:
|
if(strcmp(cmd, "/engineon", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleModel(playerid) != 509 || 481 || 510)
{
if(vehid != INVALID_VEHICLE_ID)
{
if(EngineStatus[GetPlayerVehicleID(playerid)] == 0)
{
GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
EngineStatus[playerid] = 1;
SendClientMessage(playerid, 0xFFFFFFAA, "{2F991A}Upalio {FFFFFF}si vozilo!");
format(string, sizeof(string), "* %s je upalio vozilo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
}
}
else
{
SendClientMessage(playerid, 0x00FF00FF, "{E31919}Nisi u vozilu!");
}
return 1;
}
if(strcmp(cmd, "/engineoff", true) == 0)
{
if(IsPlayerInAnyVehicle(playerid) && GetPlayerVehicleModel(playerid) != 509 || 481 || 510)
{
if(vehid != INVALID_VEHICLE_ID)
{
if(EngineStatus[playerid] == 1)
{
GetVehicleParamsEx(vehid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
EngineStatus[GetPlayerVehicleID(playerid)] = 0;
SendClientMessage(playerid, 0xFFFFFFAA, "{E31919}Ugasio {FFFFFF}si vozilo!");
format(string, sizeof(string), "* %s je ugasio vozilo.", sendername);
ProxDetector(30.0, playerid, string, COLOR_CHAT1,COLOR_CHAT2,COLOR_CHAT3,COLOR_CHAT4,COLOR_CHAT5);
}
}
}
else
{
SendClientMessage(playerid, 0x00FF00FF, "{E31919}Nisi u vozilu!");
}
return 1;
}