Please HELP!!!!!
#3

Quote:
Originally Posted by park4bmx
Посмотреть сообщение
because i cant be asked to download your script i will tell you how to do it
in your GameMode
SIMPLE way
pawn Код:
//Where is OnPlayerEnterVehicle  (Fin it and remove your function for the engine & replace it with this)
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
return 1;
}

//then when the players exit Turn it off
public OnPlayerExitVehicle(playerid, vehicleid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
return 1;
}
the more COMPLEX way with the command /engine
which will keep the engine running when you EXIT the car if you turned the engine ON yourself
pawn Код:
//first the command
//i dont know what u use CMD or the normal one so
COMMAND:engine(playerid,params[])
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetPVarInt(playerid, "engine")==1)
{
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 0);
SendClientMessage(playerid,0x0000FFFF,"Engine ON");
}else
{
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 1);
SendClientMessage(playerid,0x0000FFFF,"Engine Off");
}
return 1;
}


//When he Enters
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetPVarInt(playerid, "engine")==1)
{
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 0);
}else
{
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 1);
}

//When he Exits
public OnPlayerExitVehicle(playerid, vehicleid)
{
new engine,lights,alarm,doors,bonnet,boot,objective;
GetVehicleParamsEx(vehicleid,engine,lights,alarm,doors,bonnet,boot,objective);
if(GetPVarInt(playerid, "engine")==1)
{
SetVehicleParamsEx(vehicleid,true,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 0);
}else
{
SetVehicleParamsEx(vehicleid,false,lights,alarm,doors,bonnet,boot,objective);
SetPVarInt(playerid, "engine", 1);
}
}
return 1;
}
// when he exits you don't really need it i think but just 2 make sure ;)
it didnt help me beacus there is an other system... do you have skype myb i can send you the gamemod?
Reply


Messages In This Thread
Please HELP!!!!! - by Stuf - 18.07.2011, 16:50
Re: Please HELP!!!!! - by park4bmx - 18.07.2011, 16:59
Re: Please HELP!!!!! - by Stuf - 18.07.2011, 17:21
Re: Please HELP!!!!! - by park4bmx - 18.07.2011, 17:26
Re: Please HELP!!!!! - by Adil - 18.07.2011, 20:34

Forum Jump:


Users browsing this thread: 3 Guest(s)