Also can you make it so you can edit the color of your trail?
[QUOTE=quacles;25901809]Couple questions:
If I wanted to set the pointshop menu to open when you press Q, would it be possible?
Can I make it so that when you buy something, you can spawn it again from your inventory, with out selling it?
Thank you for being so awesome _undefined[/QUOTE]
1. Will add that as an option.
2. Give me an example of something that spawns in the world that you'd want to respawn?
3. No probs.
[editline]7th November 2010[/editline]
[QUOTE=haydenbinkley;25901980]Also can you make it so you can edit the color of your trail?[/QUOTE]
Will look into it.
[QUOTE=_Undefined;25904269]1. Will add that as an option.
2. Give me an example of something that spawns in the world that you'd want to respawn?
3. No probs. [/QUOTE]
1. Huzzah :D
2. Something like a prop. I used gm_spawn.
So like, when it's in your inventory, you'd wanna click on it to make it respawn again?
[QUOTE=_Undefined;25904402]So like, when it's in your inventory, you'd wanna click on it to make it respawn again?[/QUOTE]
Yeah
Unlocking toolgun modes through this would be kinda cool also.
Could you make like a trade system so you can give players stuff or trade stuff?
[QUOTE=thejjokerr;25911429]Instead of putting all items in 1 file, wouldn't it be easier to load them from a folder named items/ ?
Like
[lua]
function loadItemsFuncChangeName()
for k, v in pairs( file.FindInLua( "PointShop/items/*.lua" ) )do
local oldITEM = ITEM;
ITEM = {}
include(currentDirectory .. "items/" .. v);
POINTSHOP.Items[ #POINTSHOP.Items + 1 ] = ITEM;
ITEM = oldITEM;
end;
end;
[/lua]
And then an example item would be:
[lua]
ITEM.Name = "Turtle Hat",
ITEM.Enabled = true,
ITEM.Description = "Gives you a turtle hat.",
ITEM.Cost = 100,
ITEM.Model = "models/props/de_tides/Vending_turtle.mdl",
ITEM.Functions = {
OnGive = function(ply, item)
item.Hooks.PlayerSpawn(ply, item)
end,
OnTake = function(ply, item)
if ply.Hat then
ply.Hat:Remove()
end
end,
ModifyHat = function(ent, pos, ang)
pos = pos + (ang:Forward() * -3)
ang:RotateAroundAxis(ang:Up(), -90)
return ent, {Pos = pos, Ang = ang}
end,
},
[/lua]
I mean, it'd both look better and it would make it easier for people to add items..[/QUOTE] That would be nice.
Yes i agree with what the joker says, Also could i help you make something like what i use in my minigame system? i was thinking of something like this :
[LUA]
ITEM.Name = "Turtle Hat",
ITEM.Enabled = true,
ITEM.Description = "Gives you a turtle hat.",
ITEM.Cost = 100,
ITEM.Model = "models/props/de_tides/Vending_turtle.mdl",
function ITEM.Functions:OnGive(ply, item)
item.Hooks.PlayerSpawn(ply, item)
end,
function ITEM.Functions:OnTake(ply, item)
if ply.Hat then
ply.Hat:Remove()
end
end,
function ITEM.Functions:ModifyHat(ent, pos, ang)
pos = pos + (ang:Forward() * -3)
ang:RotateAroundAxis(ang:Up(), -90)
return ent, {Pos = pos, Ang = ang}
end
-- or even something like this :
function ITEM.Hooks:PlayerSpawn( ply )
print( ply:Nick .. " Just spawned!" );
end
-- that hook gets added when created and removed when deleted.
[/LUA]
[QUOTE=thejjokerr;25911429]Instead of putting all items in 1 file, wouldn't it be easier to load them from a folder named items/ ? I mean, it'd both look better and it would make it easier for people to add items..[/QUOTE]
[QUOTE=_Undefined;25867365]I'm going to make it easier to add/remove items shortly, with a folder of files rather than a table in one file, so people can drag and drop items.[/QUOTE]
[editline]7th November 2010[/editline]
[QUOTE=Ningaglio;25911711]Yes i agree with what the joker says, Also could i help you make something like what i use in my minigame system? i was thinking of something like this :[/QUOTE]
Hooks already exist. Really.
[editline]7th November 2010[/editline]
I recommend anyone who has edited sh_items.lua take a backup now, as I've rewritten the file to include files from a folder. The update will be out later.
[QUOTE=_Undefined;25912164]I recommend anyone who has edited sh_items.lua take a backup now, as I've rewritten the file to include files from a folder. The update will be out later.[/QUOTE]
Sounds exciting, I can't wait!
Moved all items to folders, and Hats now seem to start working as soon as you buy them, rather than needing a respawn. Oh, and they've stopped twitching in SP. Enjoy!
Just an argument for the amount of times you can re-click something, where 0 would be infinite, and -x would subtract, would be amazing.
[QUOTE=Zephilinox;25913322]Just an argument for the amount of times you can re-click something, where 0 would be infinite, and -x would subtract, would be amazing.[/QUOTE]
What. Click what?
[editline]7th November 2010[/editline]
[QUOTE=tgp1994;25906401]Unlocking toolgun modes through this would be kinda cool also.[/QUOTE]
Shouldn't your admin mod be doing this?
I get the errors of...
[code] [addons\pointshop\lua\sv_pointshop.lua:178] attempt to index local 'to_set' (a boolean value) [/code]
[code] [addons\pointshop\lua\sv_pointshop.lua:160 attempt to index local 'to_take' (a boolean value) [/code]
[code] [addons\pointshop\lua\sv_pointshop.lua:178] attempt to index local 'to_set' (a boolean value) [/code]
You aren't giving a name.
Fixed.
[QUOTE=_Undefined;25913514]What. Click what?
[editline]7th November 2010[/editline]
Shouldn't your admin mod be doing this?[/QUOTE]
[QUOTE=_Undefined;25904402]So like, when it's in your inventory, you'd wanna click on it to make it respawn again?[/QUOTE]
[QUOTE=Zephilinox;25914353][/QUOTE]
Do you mean per purchase of an item or per life or?
[QUOTE=_Undefined;25914372]Do you mean per purchase of an item or per life or?[/QUOTE]
Per purchase of an item, so if I (for example) bought a prop which had the respawn argument set to "0" I would be able to spawn it infinite times across lifes.
Alright. Will work on it.
[QUOTE=_Undefined;25913514]
Shouldn't your admin mod be doing this?[/QUOTE]
I mean using your pointsystem. Sure, there are admin mods to do that, but they require direct admin intervention, and they don't use the points :)
[QUOTE=tgp1994;25915390]I mean using your pointsystem. Sure, there are admin mods to do that, but they require direct admin intervention, and they don't use the points :)[/QUOTE]
I guess. The only problem I have is actually restricting it in the first place, as the hooks on items only come into effect when a player has the item in their inventory.
Also, limited respawns are now on. See the pistol item for details.
[QUOTE=_Undefined;25915503]I guess. The only problem I have is actually restricting it in the first place, as the hooks on items only come into effect when a player has the item in their inventory.[/QUOTE]
I bet you could take a look at URestrict's code (I think that's Ulysses's answer for toolmode restricting).
I know how to do the restriction. I'll have a look at implementing it.
[editline]7th November 2010[/editline]
Alright done that. See new item in unlocks for details. I'm done with this for today.
I know where this could go, it could be the front end of a VIP seller thingy :)
Could you make a version where it saves in .txts? The txt files shuld be names with the players SteamID.
Could you possibly do that?
[QUOTE=Crap-Head;25918817]Could you make a version where it saves in .txts? The txt files shuld be names with the players SteamID.
Could you possibly do that?[/QUOTE]
Nope. Feel free to do it yourself though.
Thanks for all of these releases _Undefined. They're all really great! :)
Buying items isn't working
-Suggestion-
Add an option in the config where you Can sellect how many points the player shuld start with.
Sorry, you need to Log In to post a reply to this thread.