Listing player owned Vehicles
#1

Hey, I'm having a problem listing the vehicles owned by a player through the database. I want it so when they do /vlist it loops through the database until it's found all vehicles owned by that player and then lists them all.

After I've managed to list it I'm going to edit it so it shows the model name rather than the ID, I'm just using this for test purposes at the moment.

When I run the command in the code tags below, it just loops a bunch of: Model ID - 0

Код:
CMD:vlist(playerid, params[]) {
	new string[128];
	for(new i = 1; i < MAX_VEHICLES; i++)
	{
		if(pvVariables[i][pvOwnerId] == playerVariables[i][pInternalID])
		{
			format(string, 128, "Model ID - %d", pvVariables[playerid][pvModel]);
			SendClientMessage(playerid,COLOR_YELLOW,string);
		}
	}
	return 1;
}
Thanks.
Reply


Messages In This Thread
Listing player owned Vehicles - by Jonesy96 - 22.02.2013, 17:44
Re: Listing player owned Vehicles - by Jonesy96 - 22.02.2013, 18:47

Forum Jump:


Users browsing this thread: 1 Guest(s)