SA-MP Forums Archive
Help me shop buy/sell/delete vehicle - 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: Help me shop buy/sell/delete vehicle (/showthread.php?tid=499700)



Help me shop buy/sell/delete vehicle - SFRPVN - 09.03.2014

I want buy vehicle when player Enter and player is PLAYER_STATE_DRIVER.

when they sit on the car and are willing to pay, there will be 1 car created just outside the door and it is their car. it will live forever on the same system as I have created.


Re: Help me shop buy/sell/delete vehicle - RenovanZ - 09.03.2014

OnPlayerEnterVehicle > !ispassenger > showdialog with price > buy the car > create cars for player x+3 from his current pos, also save the data.


Re: Help me shop buy/sell/delete vehicle - SFRPVN - 09.03.2014

can you show me script?


Re : Help me shop buy/sell/delete vehicle - mirou123 - 09.03.2014

Are you using any saving system?like mysql,yini etc?


Re: Re : Help me shop buy/sell/delete vehicle - SFRPVN - 09.03.2014

Quote:
Originally Posted by mirou123
Посмотреть сообщение
Are you using any saving system?like mysql,yini etc?
i have use dini


Re : Help me shop buy/sell/delete vehicle - mirou123 - 09.03.2014

Okay so you probably have something like

Код:
enum pInfo
{
Money,
Level,
//Etc...
//Add this
pVehicle;
}

enum vinfo
{
vPosX,
vPosY,
vPosY,
vAngle,
vColor,
vModel
//etc....
}
and when you create the car Do something like GetPlayerPos(playerid, vPosx,vPosY,vPosZ);
That will save the position
Then save the model in vModel
Then you can save the vehicle into the player's file.And each time they login load the car.


Re: Help me shop buy/sell/delete vehicle - SFRPVN - 09.03.2014

help me full script


Re : Help me shop buy/sell/delete vehicle - mirou123 - 09.03.2014

I can't do that.I don't know what variables are you using and it's a long code.Try to find a filterscript or follow some tutorials