Assign a vehicle to a player / account ?
#1

Hey,

In my script I want to make it possible that every player can buy a vehicle etc. and that only this player can /lock, /sell and so on that vehicle. That means I want to assign it to a player. But to be honest, I have no clue how to do that. I thought about maybe generating a random number to identify players or so but I am not sure.

-> So how can I a) e.g. put a random number on vehicles ( not @ OnGameModeInit ) or b) Just assign a vehicle to a player?

Thanks.
Reply
#2

Vehicles[MAX_PLAYERS]
should be your array
then when the player logs in create the vehicle with
pawn Код:
Vehicles[playerid] = CreateVehicle(blah, blah, blah);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)