I've tried all the threads I could find here on this subject but none of them worked. So how do you make it so that only a specific person with only his steamID can buy a certain item in pointshop
Thanks in advance!
Use this [url]http://pointshop.burt0n.net/items/functions#can-player-buy[/url] and detect if the players steamid is the one you want.
If you are using ULX (And you are), and you want to do this with one man only, I would create a group just for him and then read [URL="http://pointshop.burt0n.net/items/properties#allowed-user-groups"]this[/URL] (you'll know what to do)
Also with the group you can give him permission to whatever you want, if you want only him to buy it it sounds like you would want that
[QUOTE=crazyscouter;45603190]Use this [url]http://pointshop.burt0n.net/items/functions#can-player-buy[/url] and detect if the players steamid is the one you want.[/QUOTE]
so will it be something like this:
[CODE]function ITEM:CanPlayerBuy(ply)
return ply:SteamID = "Steamid"
end[/CODE]
Yea, except make sure you're checking not assigning, so you'll want another equals sign( so it would look like == ) also ply:SteamID is a function so it would need to be ply:SteamID()
[QUOTE=okkeh96;45603213]so will it be something like this:
[CODE]function ITEM:CanPlayerBuy(ply)
return ply:SteamID == "Steamid"
end[/CODE][/QUOTE]
[QUOTE=crazyscouter;45603230]Yea, except make sure you're checking not assigning, so you'll want another equals sign( so it would look like == ) also ply:SteamID is a function so it would need to be ply:SteamID()[/QUOTE]
[CODE]function ITEM:CanPlayerBuy(ply)
return ply:SteamID() == "Steamid"
end[/CODE]
Like this? And do I replace the alive code or can I add it?
That was an example. Just add that function you wrote to your item's file.
Sorry, you need to Log In to post a reply to this thread.