Define custom weapon names
#9

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
By loading you mean the inventory of a player, right? If so, don't change anything to the above.

When a player connects, you need to execute a query that selects the items and the amount for the player with that user ID. Then load them and assign them to some global (per-player) variables.

PS: "break;" stops the loop. If the model was found and string now stores the name of it, no need to keep looping.
So let's say I have three guns in my inventory. Gun 1001, 1004 and 1002 (image). How do I load these guns to one enum?
I guess I have to make a loop, but how would it look?

Before we did: 1 gun (1001) --> stored in Player[playerid][pTest]
Now we do: 3 guns (1001, 1004, 1002) --> stored in what?
Reply


Messages In This Thread
Define custom weapon names - by SiraBots - 01.06.2015, 18:59
Re: Define custom weapon names - by Konstantinos - 01.06.2015, 19:10
Re: Define custom weapon names - by SiraBots - 01.06.2015, 19:12
Re: Define custom weapon names - by Konstantinos - 01.06.2015, 19:16
Re: Define custom weapon names - by SiraBots - 01.06.2015, 19:18
Re: Define custom weapon names - by Konstantinos - 01.06.2015, 19:27
Re: Define custom weapon names - by SiraBots - 01.06.2015, 19:55
Re: Define custom weapon names - by Konstantinos - 01.06.2015, 20:02
Re: Define custom weapon names - by SiraBots - 01.06.2015, 20:14
Re: Define custom weapon names - by Konstantinos - 01.06.2015, 20:26

Forum Jump:


Users browsing this thread: 1 Guest(s)