Inventory Trading
#5

Quote:
Originally Posted by Mencent
Посмотреть сообщение
Hello!

PHP код:
ShowInventoryTrade(playerid); 
to
PHP код:
ShowInventoryTrade(player1); 
Does it work?
Does not work unfortunately. It shows the trade dialog to player1 , but still sends the item to Id 0.

"I guess it will not, because player1 is not the player who should see the inventory, but that should receive the item that playerid selected.

The simplest approach would be a global variable (per player obviously).

Store the playerid to that var in the code for the command, then in OnPlayerModelSelection you set player1 to that value."

Could anyone give me an example on how i can do that?

EDIT: Can this be done by storing the player id into an enum?
Reply


Messages In This Thread
Inventory Trading - by jasperschellekens - 23.03.2017, 19:56
Re: Inventory Trading - by Mencent - 23.03.2017, 20:50
Re: Inventory Trading - by NaS - 23.03.2017, 20:53
Re: Inventory Trading - by Mencent - 23.03.2017, 20:55
Re: Inventory Trading - by jasperschellekens - 23.03.2017, 20:58
Re: Inventory Trading - by Mencent - 23.03.2017, 21:11
Re: Inventory Trading - by jasperschellekens - 23.03.2017, 21:21

Forum Jump:


Users browsing this thread: 1 Guest(s)