Car engine
#1

Before you start reading my topic,I would like to wish you to have a happy new year,with love,health and lets hope that every wish will come true!!
Hello,

I was wondering,is there any way to turn automatically ON the vehicle engine,instead of typing /engineon and etc?
I was looking on the SAMP wiki when i found "OnPlayerEnterVehicle" but nothing,i searched it on my script and i found this:

Code:
//==============================================================================

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

//==============================================================================

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

//==============================================================================
Also,found these:
Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
	new pname[24];
	new string[128];
	GetPlayerName(playerid,pname,sizeof(pname));

	//Save Last Vehicle ID (Detain)
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
	    new engine,lights,alarm,doors,bonnet,boot,objective;
		new vid = GetPlayerVehicleID(playerid);
	    GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
		if(engine != VEHICLE_PARAMS_ON && !IsAPlane(vid) && !IsACycleBike(vid))
		{
		    SendClientMessage(playerid,COLOR_DODGERBLUE,"To turn on the vehicle engine type /engineon or s.");
		}
		if(engine != VEHICLE_PARAMS_ON && IsAPlane(vid) && !IsACycleBike(vid))
		{
		    SendClientMessage(playerid,COLOR_DODGERBLUE,"To turn on a plane engine type /engineon.");
		}
		if(engine != VEHICLE_PARAMS_ON && IsACycleBike(vid))
		{
		    SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
		}
	    LastVehicle[playerid] =GetPlayerVehicleID(playerid);
	}
Thanks in advance,for reading my thread!

Best Regards,
George
Reply


Messages In This Thread
Car engine - by geohareas - 01.01.2013, 10:27
Re: Car engine - by =WoR=Varth - 01.01.2013, 10:56
Re: Car engine - by geohareas - 01.01.2013, 11:46
Re: Car engine - by =WoR=Varth - 01.01.2013, 11:59

Forum Jump:


Users browsing this thread: 1 Guest(s)