SA-MP Forums Archive
Something to script. - 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: Something to script. (/showthread.php?tid=302943)



Something to script. - SomebodyAndMe - 11.12.2011

Could someone make this:

When u are near a plane in this case, a hydra or shamal. And u press the G command, it sets u as co-pilot.

I guess it's like spectating someone.

Anyways thanks.


Re: Something to script. - suhrab_mujeeb - 11.12.2011

Request scripts here: https://sampforum.blast.hk/showthread.php?tid=187229
btw, that's a good idea.


Re: Something to script. - Steven82 - 11.12.2011

Quote:
Originally Posted by SomebodyAndMe
Посмотреть сообщение
Could someone make this:

When u are near a plane in this case, a hydra or shamal. And u press the G command, it sets u as co-pilot.

I guess it's like spectating someone.

Anyways thanks.
You would have to detect if someone is even in the drivers seat. And if not then set the person who pressed 'G' as the pilot.


Re: Something to script. - JamesC - 11.12.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
You would have to detect if someone is even in the drivers seat. And if not then set the person who pressed 'G' as the pilot.
Why not just get them to spectate the vehicle...? Anyway, this is quite easily accomplished. Just loop through the vehicles under OnPlayerKeyStateChange. If they are already 'in' a vehicle and press it, get the position of the vehicle they are spectating and set their position there. In case of a plane, you'll need to give them a parachute. Also, you'll need to modify IsPlayerInAnyVehicle and other seat related functions.


Re: Something to script. - Rafiko - 11.12.2011

well if thats so easy why wont u make it? xD

tnx in advance + i love the idea


Re: Something to script. - Babul - 11.12.2011

putting a player into an invalid seatid is not possible anymore. its to avoid crashing players who want to exit a vehicle with no exit animation. sadly, you can only achieve the pasanger seat "effect" by spectating. but then a chatbubble or the healthbar wont not show up for the driver ><