How to get user from SetOnSlotChanged
#1
Hey,

The wiki says i need to use dowithuser, though that needs a username..
I don't even get a username, i can't obtain it from the window so.. I'm kinda stuck here.
Am i able to add something extra to the callback like the player name or perhaps the cPlayer itself ?

Also, the server seems to crash, if a plugin opens a window, the client actually triggers this in the plugin doesn't close it, and the plugin gets reloaded, when the player interacts with the window aka it doesn't exist i assume ? the server crashes.

Edit, Also when i do a SetSlot it seems to trigger SetOnSlotChanged.. as my onslot change, does a setslot it go's into a loop until it gets a LUA: 2 - C stack overflow.. How to fix this ?

Edit2,
local dropItem = cPickup(Player:GetPosX(), Player:GetPosY(), Player:GetPosZ(), Window:GetSlot(Player, 0),true);
Seems to not drop, but does crash the server ? am i using it wrong ? also the wiki does not have anything about the boolean, i asume false = non player, true = player

Also the finding user problem i fixed by saving playername + windowid in array.
And items lose there damage, when you move them in your inventory ?
Reply
Thanks given by:


Messages In This Thread
How to get user from SetOnSlotChanged - by ThuGie - 01-31-2014, 12:37 PM



Users browsing this thread: 4 Guest(s)