• PointMod - Earn points and buy items with them!
    214 replies, posted
[QUOTE=_Undefined;25290908] :words: [img]http://dl.dropbox.com/u/3720666/pointshop.gif[/img][/QUOTE] that is awsome :o
What would i do to make the points mod give points after a certain ammount of time like every 5 min you get 5 points.
[QUOTE=deathslayer95;25320023]What would i do to make the points mod give points after a certain ammount of time like every 5 min you get 5 points.[/QUOTE] Example > [code]local PointsToGive = 10 timer.Create( "GivePoints", 300, 0, function() for k, v in ipairs( player.GetAll() ) do v:GivePoints( PointsToGive ) end end ) [/code] <>_<> .... Thats an example it give 10 points every 300 secs :d local PointsToGive = 10 ~ 10 is how many points it give timer.Create( "GivePoints", 300, 0, function() ~ Time ( the 300 ) make a new file and put it in lua/autorun/server :)
[QUOTE=Siemz;25331411]Example > [code]local PointsToGive = 10 timer.Create( "GivePoints", 300, 0, function() for k, v in ipairs( player.GetAll() ) do v:GivePoints( PointsToGive ) end end ) [/code] <>_<> .... Thats an example it give 10 points every 300 secs :d local PointsToGive = 10 ~ 10 is how many points it give timer.Create( "GivePoints", 300, 0, function() ~ Time ( the 300 ) make a new file and put it in lua/autorun/server :)[/QUOTE] Thanks!
would anyone please be as kind as to share with me the item code (the bit that defines the item, price, ect) for a basic hat? it can be anything, i know java, and im learning several more languages, so im pretty competint when it comes to customising codes, but i lack the ability to script my own lua codes. any help is appreciated!
Use these: [url]http://www.garrysmod.org/downloads/?a=view&id=72040[/url] The items hook is PlayerSpawn, and give them the hat if they don't have one. [img]http://i.imgur.com/ptQsC.png[/img]
How would you give them the hat?
[lua]if not ply.Hat then ply.Hat = ents.Create("hat_ent") end[/lua] Or something that fits the needs.
PointMod.Items[1] = { "Hat", "Hat", "trails/Hat.vmt", "Hat", 100, "PlayerSpawn, function( ply ) Where would I put that?
Right, I have a question aswell: How would I get this so that there is an NPC and when someone clicks E on him the menu will pop-up? I know its asking a lot but please help
thanks for the hats link. ill be sure to try that soon.
Is that possible to make buyable LS3 items ? If yes, this is awesome !
so, to make the hats work, would it be this or something like it? again, total noob to lua :/ [code] PointMod.Items[5] = { "skull_hat", "a skull hat", "materials/skullicon.vtf", "skull_hat", 120, "PlayerSpawn", function( ply ) if ply:Team() == 1 then timer.Simple(0.2, function() ply:SpawnEnt( "hatnamehere" ) end) end end } [/code]
[QUOTE=masonrulz;25381778]so, to make the hats work, would it be this or something like it? again, total noob to lua :/ [code] PointMod.Items[5] = { "skull_hat", "a skull hat", "materials/skullicon.vtf", "skull_hat", 120, "PlayerSpawn", function( ply ) if ply:Team() == 1 then timer.Simple(0.2, function() ply:SpawnEnt( "hatnamehere" ) end) end end } [/code][/QUOTE] Maybe something similar, as the SpawnEnt function doesn't exist (unless you created it).
oh. hmm. is thier a pre-existing entity create function?
[b][url=http://wiki.garrysmod.com/?title=Ents.Create]Ents.Create [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]
Why thank you fine sir.
k, i made a hat code, and im getting the glitch where the stores icons are a flat bar in the upper left of the derma menu. what causes this glitch? this is the code [code] PointMod.Items[18] = { "skull_hat", "a skull hat", "models/Gibs/HGIBS.mdl", "skull_hat", 120 , "PlayerSpawn", function( ply ) if ply:Team() == 1 then timer.Simple(0.2, function() ply:ents.create( "skull_head" ) end) end end } [/code]
What would be the code so that you do not have to respawn to use you item you bought. And i also need the code so when someone uses their item they loose it after it is used.
i love how you guys rated me dumb because im asking a noob question, yet you cant help. if its a dumb question, then give the answer, if its so simple to you.
[QUOTE=masonrulz;25473270]i love how you guys rated me dumb because im asking a noob question, yet you cant help. if its a dumb question, then give the answer, if its so simple to you.[/QUOTE] Typical Facepunce for ya. One must keep in mind that these are mostly kids on here though there are some older people but you can roughly tell who's under a certain age and who's not. I been asking similar questions on this addon and no one gives a straight answer so i take it to another site and get help or completely rewrite the code to work my way and CR it.
I'll be releasing my version of this (through SVN only) once I've fixed a few things. It supports powerups, hats, and trails by default but can be extended with pretty much anything. I've only looked at the source of this to make sure my function names match to provide a drop-in replacement, and any similarities are purely coincidental, of which I have seen a few.
entities! add an entity to it also... unless that what the hats are.... late = tired, brain is blah atm
Yeah the hat is a single entity, each item just modifies it in the clientside draw code.
-snip- on reqeust
[QUOTE=_Undefined;25482201]I'll be releasing my version of this (through SVN only) once I've fixed a few things. It supports powerups, hats, and trails by default but can be extended with pretty much anything. I've only looked at the source of this to make sure my function names match to provide a drop-in replacement, and any similarities are purely coincidental, of which I have seen a few.[/QUOTE] where will you release it
hey im wondering if enbody knows how to add new tabs because i whant a models tab to change player so that means i also need somthing like a script of a model that you can buy from the models tab ??? can enybody help
[QUOTE=_Undefined;25482201]I'll be releasing my version of this (through SVN only) once I've fixed a few things. It supports powerups, hats, and trails by default but can be extended with pretty much anything. I've only looked at the source of this to make sure my function names match to provide a drop-in replacement, and any similarities are purely coincidental, of which I have seen a few.[/QUOTE] Where/ when will you release it? From the gif it looks sexy
Here ya go: [url]https://equinox-studios.svn.beanstalkapp.com/pointshop/[/url] Let me know if you find any problems and I'll get them fixed. Hats spaz out in singleplayer a bit, but work fine on a dedi server.
[QUOTE=_Undefined;25763575]Here ya go: [url]https://equinox-studios.svn.beanstalkapp.com/pointshop/[/url] Let me know if you find any problems and I'll get them fixed. Hats spaz out in singleplayer a bit, but work fine on a dedi server.[/QUOTE] that is freaking epic ! :D THNX ps_setpoints and ps_givepoints dont work :( - and cant see hats :p when i respawn ( thirdperson )
Sorry, you need to Log In to post a reply to this thread.