05.10.2012, 16:56
(
Последний раз редактировалось jeremy8810; 05.10.2012 в 17:36.
)
Hi guys,
Got two commands that are not working, I dont have any errors in my GM, so I dont know why they are not working...
Plz let me know here is the code:
Thnx,
Jer
Got two commands that are not working, I dont have any errors in my GM, so I dont know why they are not working...
Plz let me know here is 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,-1,"ERROR:Your must be in a vehicle.");
if(GetPlayerVehicleSeat(playerid) == 0)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(engine == 0)
{
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~g~Engine started",3000,1);
}
else if(engine == 1)
{
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~r~Engine stopped",3000,1);
}
}
return 1;
}
CMD:lights(playerid,params[])
{
new engine,lights,alarm,doors,bonnet,boot,objective,vehicleid;
vehicleid = GetPlayerVehicleID(playerid);
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"ERROR:Your must be in a vehicle.");
if(GetPlayerVehicleSeat(playerid) == 0)
{
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(lights == 0)
{
SetVehicleParamsEx(vehicleid,engine,true,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~g~Lights on",3000,1);
}
else if(lights == 1)
{
SetVehicleParamsEx(vehicleid,engine,false,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid,"~r~Lights off",3000,1);
}
}
return 1;
}
Jer