How to manage a car system
#1

I was just wondering, Whats the correct way of going around managing car ownership, I was thinking of saving the modelid to the players account then create onconnect and destory on disconnect. I know they have a id but not sure about how to use it. Im new to PAWN and know only basic but i am willing to learn.
Reply
#2

https://sampwiki.blast.hk/wiki/GetVehicleModel
Reply
#3

What i did is make it so in the array that stores the players information, it also has CAR1, and when the car is spawned it is spawned with the code
pawn Код:
gPlayerData[playerid][CAR1] = AddStaticVehicleEX(blah, blah, blah)
so when they log off it can get the position for the vehicle, and delete it easily. feel free to look at my script to figure out stuff, if you copy parts of it i only ask that you put a comment saying where you got the code from in your game mode. Good luck with your future pawn coding and feel free to pm me if you get stuck with stuff.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)