• Pointshop Autosell
    8 replies, posted
I'm trying to get a script that will autosell certain items when a player joins. That way I can remove items and not have people waste money. [CODE]function PointshopItemsSell( ply ) for k, v in pairs( player.GetAll() ) do v:PS_SellItem('bane') end end hook.Add( "PlayerSpawn", "PointshopStuff", PointshopItemsSell ) [/CODE] I've tried that and various other versions but can't get anything to work. Any help?
Is PS_SellItem client or serverside?
Server. On another note, why are you looping through EVERY player when one player spawns to sell this item?
Selling in pointshop only returns 75%, use TakeItem and GivePoints.
Damnit Harry, you snipped your post.
Also just for future reference pointshop has the method Player:PS_SellItem(item_id) both server and client, client just net messages to the server for you. Also that 75% only applies if he has that setup like that.
It's only server. Letting the client have control over that doesn't sound like something Adam would do. [url]http://pointshop.burt0n.net/player-meta-functions/items#sell-item[/url]
[URL]https://github.com/adamdburton/pointshop/blob/master/lua/pointshop/cl_player_extension.lua[/URL] 5th method down it just networks the information to the server, doesn't that mean it works also on client side? pointshops vgui has to tell the server some way that the user sells there item and rather then laying network messages make your code clean with methods that do it for you. I'm not saying it's handle client side but it can be called and does the same thing it's just client networks it to the server.
Correct, the client methods just exist for convenience, server does all the work.
Sorry, you need to Log In to post a reply to this thread.