SA-MP Forums Archive
How to add vehicles - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to add vehicles (/showthread.php?tid=115157)



How to add vehicles - Lotusmp - 22.12.2009

Hello i want add vehicles to my gm etc.make a car shop .and rent or buy cars


Re: How to add vehicles - Lotusmp - 22.12.2009

eny help?


Re: How to add vehicles - boelie - 22.12.2009

You can look and learn from here https://sampwiki.blast.hk/wiki/AddStaticVehicle

This is how you tell the scrip/gamemode

you put it under ongamemodeinit just like the example on the link i gave you.

A rent and buy system would be a bit harder i suggest you try adding vehicles first and when you learned that you can try further.
on addstaticvehicle the first number you see is the 'id' of the vehicle wich you can also find here; http://weedarr.wikidot.com/veh

The last 2 numbers on addstaticvehicle are the colors


if you wanna learn more or have questions just PM me


Re: How to add vehicles - Lotusmp - 22.12.2009

i can add vehicles now i want them to make rentable or buyble


Re: How to add vehicles - boelie - 22.12.2009

Well there are different ways to do that.

Do you want players to drive to shop and buy it ?

do you want to make it buyable with a menu ?

You can also make an npc (bot) that sells a player a vehicle ..that would be funny and creative ...



Re: How to add vehicles - Lotusmp - 22.12.2009

not menu i want player to go and buy/rent it!!!


Re: How to add vehicles - boelie - 22.12.2009

Quote:
Originally Posted by <Davis>
not menu i want player to go and buy/rent it!!!
Do you realy need to use those ' it!!! ' looks like your yelling at me

So ..with just a command ? okay thats kind of easy i wont script it for you cause that takes time and you wont be learning. But it should look like something like this;


Put it under onplayercommand something like here;


public onplayercommand

sendclientmessage ( a message that ask you if you want to buy or rent a car)

if (part where you make the command like /buy or /rent)
{
getplayerstate;
if PLAYERSTATE_DRIVER --here it tells the script that you are in a vehicle while typing this command
{
(something to unlock your car)
}

Look it up on wiki samp im sure you can figure it out.


Re: How to add vehicles - Lotusmp - 23.12.2009

ok thanks man i didn't tell u to script for me am ok now