SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/01/2013, 10:27 AM   #1
geohareas
Big Clucker
 
Join Date: Sep 2012
Posts: 180
Reputation: -1
Default Car engine

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
geohareas is offline   Reply With Quote
Old 01/01/2013, 10:56 AM   #2
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 1,988
Reputation: 133
Default Re: Car engine

http://wiki.sa-mp.com/wiki/ManualVehicleEngineAndLights
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Old 01/01/2013, 11:46 AM   #3
geohareas
Big Clucker
 
Join Date: Sep 2012
Posts: 180
Reputation: -1
Default Re: Car engine

So?I got to remove it?Because i already have it..
geohareas is offline   Reply With Quote
Old 01/01/2013, 11:59 AM   #4
=WoR=Varth
High-roller
 
=WoR=Varth's Avatar
 
Join Date: Apr 2011
Location: Indonesia
Posts: 1,988
Reputation: 133
Default Re: Car engine

Yes remove it.
__________________
(RETIRED)
=WoR=Varth is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help with engine Mustafa6155 Scripting Help 0 12/10/2012 04:12 PM
/engine bug Luis- Help Archive 22 23/06/2011 04:58 AM
[HELP]I just edited my /engine system and when i do /engine it says "unknown Lilcuete Help Archive 2 25/04/2010 01:31 PM
The Best Game Engine [Esenthel Engine] roleplayman Everything and Nothing 26 07/05/2009 10:33 AM
Engine start and engine broken. speedy199 Server Support 3 31/03/2009 10:09 AM


All times are GMT. The time now is 05:45 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.