SA-MP Forums Archive
/car engine - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /car engine (/showthread.php?tid=459980)



/car engine - FLapJAck - 25.08.2013

Help me to make /car engine PLease


Re: /car engine - PrinceKumar - 25.08.2013

Car engine system??


Re: /car engine - Aliassassin123456 - 25.08.2013

pawn Код:
#define SCM SendClientMessage
new bool:Engine[MAX_VEHICLES],engine,lights,alarm,doors,bonnet,boot,objective;
public OnGameModeInit()
{
for(new i;i<MAX_VEHICLES;i++)
{
Engine[i] = false;
}
ManualVehicleEngineAndLights();
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext,"/engine",true))
{
new vehicle = GetPlayerVehicleID(playerid);
if(vehicle)
{
if(Engine[vehicle] == false)
{
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective);
Engine[vehicle] = true;
SCM(playerid,-1,"You Started your vehicle's Engine");
}
else
{
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective);
Engine[vehicle] = false;
SCM(playerid,-1,"You stopped your vehicle's Engine");
}
}
return 1;
}
return 0;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
new vehicle = GetPlayerVehicleID(playerid);
if(Engine[vehicle] == false)
{
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicle,1,lights,alarm,doors,bonnet,boot,objective);
}
else
{
GetVehicleParamsEx(vehicle,engine,lights,alarm,doors,bonnet,boot,objective);
SetVehicleParamsEx(vehicle,0,lights,alarm,doors,bonnet,boot,objective);
}
}
return 1;
}
public OnVehicleSpawn(vehicleid)
{
Engine[vehicleid] = false;
return 1;
}
//scripted by ali on sa-mp forum on 2 minutes :D
Hoooo!


Re: /car engine - Vanter - 25.08.2013

http://forum.sa-mp.com/showthread.ph...82#post2650782