Private Bought Car?
#1

Now, what I would like to do is when the player buys the car, make it his personal car, and save it to his user.ini or another .ini . And only he can enter the car. Btw i'm using Y_INI system.

pawn Код:
if(listitem == 0)
            {
                if(GetPlayerMoney(playerid) <10000) return SendClientMessage(playerid, COLOR_RED," You do not have enough cash!");
                new Float:_Position[4];
                GetPlayerPos( playerid, _Position[ 0 ], _Position[ 1 ], _Position[ 2 ] );
                GetPlayerFacingAngle( playerid, _Position[ 3 ] );
                CreateVehicle(509,_Position[0],_Position[1],_Position[2],_Position[3],-1,-1,-1);
                GivePlayerMoney(playerid, -300000);
                SendClientMessage(playerid, -1,"You successfuly purchased a Bike for 300,000$!");
            }
Reply
#2

Go through this tutorial and also look into your script how it's saving and loading all the player data. You basically wanna add a column in your user file and give it value of the id of your purchased vehicle.

PM me if you need me to physically help you, maybe in teamviewer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)