Hello, guys.
Well, I just got to Lua straight from PAWN (SA:MP) and there's a little question I want to share with you.
I'm about to create vehicle for player after player joined to the server. Okay, this ain't no problem. The thing is, I just wanna create some kinda ID to that and stick it with player that I would be able to do some action with certain player's vehicle.
In PAWN, it may look like this, that's simple:
new pVehicle[MAX_PLAYERS]; //create dimensional array (is there different name for that in Lua?) which will contain vehicle ID for every player
//somwhere in some global function which contains playerid parameter (ability to get player id, ain't got no place in MTA by default from what I know, here's the point)
pVehicle[playerid] = CreateVehicle(..);
//and then, we can do anything we want with player's vehicle - not all or the last created one
SetVehiclePos(pVehicle[playerid], ...);
Is it supposed to be client-side script which is calling just for one player?
Explain, please.
Thanx for any help.