06.10.2012, 21:52
Hi guys,
I made a command, if the vehicle engine is allready on, put it off. But if it is off, put it on...
But it is not working, heres the code:
It only gives me: Engine stopped when I type: /engine
but the engine have to go on....
Plz help me or tell me how I can fix it
Thanks a lot!
Jer
I made a command, if the vehicle engine is allready on, put it off. But if it is off, put it on...
But it is not working, heres the code:
pawn Код:
CMD:engine(playerid,params[])
{
new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COL_RED,"ERROR:Your must be in a vehicle.");
if(GetPlayerVehicleSeat(playerid) == 0)
{
if(GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective) == 1,lights,alarm,doors,bonnet,boot,objective)
{
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~r~Engine stopped",3000,1);
}
else if(GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective) == 0,lights,alarm,doors,bonnet,boot,objective)
{
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~g~Engine started",3000,1);
}
}
return 1;
}
but the engine have to go on....
Plz help me or tell me how I can fix it
Thanks a lot!
Jer