How to grab two id's using Y_INI
#1

Hello..
I'm currently making a vehicle ownership using Y_INI and I want to know how to make a player's vID the same as the vehicle's vID..

Also.. When a player enters his vehicle for it to say This is your vehicle.


Thanks.

Код:
enum vInfo {
	vID,
	vOwner[250],
	vPos[4],
	vLocked,
	vPrice,
}
new VehicleInfo[200][vInfo];
vehicleID is for player enum.
Reply
#2

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) && VehicleInfo[playerid][vInfo][vID] == [Where the vID is saved]))
SendClientMessage(playerid,-1, "This is your car");
Id imagine it to be like that as for your first question, im not really sure.
Reply
#3

Quote:
Originally Posted by Lz
Посмотреть сообщение
pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) && VehicleInfo[playerid][vInfo][vID] == [Where the vID is saved]))
SendClientMessage(playerid,-1, "This is your car");
Id imagine it to be like that as for your first question, im not really sure.
Thanks but how do I like.. link them together for a player car? :/
Reply
#4

Quote:
Originally Posted by [MP]Ditch
Посмотреть сообщение
Thanks but how do I like.. link them together for a player car? :/
Im kinda confused to what your asking? The players vID? Can't you use just the Vehicles ID and set it to the player and then just make a check to see if the Vehicle ID matches the one the player has?
Reply
#5

How do I do that? But then I need the variables for the /park command and that.
Reply
#6

You shouldn't be saving the vehicleid to the player's file, as it could change every time you restart the server in some cases. You should be saving the X, Y, Z coordinates of where the player parked it, the vehicle model, and the angle the vehicle is facing.
Reply
#7

Saving in the players variables?

If so..

Can you help me if creating the vehicle ownership then?
Reply
#8

Anyone?
Reply
#9

Help?!?!!?
Reply
#10

Right basically, if I make a command /givecar it'd give me 506 (I'll do the rest later and make it advanced then). But how would I get it to set my car as my VehicleID in the playerInfo enum?

EDIT: Or in a more simplier form..
How do I make a vehicle dealership?

Enum is above and my player enum is vehicleID.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)