• WIP: PointShop
    528 replies, posted
[QUOTE=_Undefined;28532023]I think someone posted a fix for this in the WAYWO thread. Something with the render library and scissors.[/QUOTE] [lua]local PANEL = {} function PANEL:Paint() local x, y = self:LocalToScreen( 0, 0 ) local w, h = self:GetSize() local sl, st, sr, sb = x, y, x + w, y + h local p = self while p:GetParent() do p = p:GetParent() local pl, pt = p:LocalToScreen( 0, 0 ) local pr, pb = pl + p:GetWide(), pt + p:GetTall() sl = sl < pl and pl or sl st = st < pt and pt or st sr = sr > pr and pr or sr sb = sb > pb and pb or sb end render.SetScissorRect( sl, st, sr, sb, true ) self.BaseClass.Paint( self ) render.SetScissorRect( 0, 0, 0, 0, false ) end vgui.Register( "DModelPanel2", PANEL, "DModelPanel" )[/lua] I'm sure there's a better way to do it, but it works.
[QUOTE=Ground Zer0;28989551]What version is this, i like it and want it!!! Also, REV 61 gives me the same old thing as the origonal post, the first version. I did what you said to do with tortoiuse and it said it did it but...... apperently not[/QUOTE] Its Crap Version. Mhee, i just modified it abit. What do you mean by "the first version"? Once you go back to rev61 everything works fine. [QUOTE=Delremos;28995515][lua]local PANEL = {} function PANEL:Paint() local x, y = self:LocalToScreen( 0, 0 ) local w, h = self:GetSize() local sl, st, sr, sb = x, y, x + w, y + h local p = self while p:GetParent() do p = p:GetParent() local pl, pt = p:LocalToScreen( 0, 0 ) local pr, pb = pl + p:GetWide(), pt + p:GetTall() sl = sl < pl and pl or sl st = st < pt and pt or st sr = sr > pr and pr or sr sb = sb > pb and pb or sb end render.SetScissorRect( sl, st, sr, sb, true ) self.BaseClass.Paint( self ) render.SetScissorRect( 0, 0, 0, 0, false ) end vgui.Register( "DModelPanel2", PANEL, "DModelPanel" )[/lua] I'm sure there's a better way to do it, but it works.[/QUOTE] You sir... <3
[QUOTE=Crap-Head;28999696]Its Crap Version. Mhee, i just modified it abit. What do you mean by "the first version"? Once you go back to rev61 everything works fine. You sir... <3[/QUOTE] I aded you on steam please accept
In revision 61 its maked so when people buy a weapon they get it until they die when they die its disappear. The current code is: Scout = { Name = "Scout", Enabled = true, Description = "Get a SCOUT sniper!", Cost = 2500, Model = "models/weapons/w_snip_scout.mdl", Functions = { OnGive = function(ply, item) ply:Give("weapon_real_cs_scout") end, OnTake = function(ply, item) item.Hooks.PlayerDeath(ply, item) end }, Hooks = { PlayerDeath = function(ply, item) if ply:PS_HasItem(item.ID) then ply:PS_TakeItem(item.ID) if ply:GetWeapon("weapon_real_cs_scout") then ply:GetWeapon("weapon_real_cs_scout"):Remove() end end end } }, Could someone maybe post a new edited code who doesn't make people lose the weapon?
Hey can anyone help me? When I press F4 to bring up the pointshop menu an little error pops up saying something like: [cl_pointshop.lua:135] attempt to index field 'Config' (a nil value). I can't find anything to help me fix it though =( Thanks in advance. =D
[QUOTE=nezdude;29074193]Hey can anyone help me? When I press F4 to bring up the pointshop menu an little error pops up saying something like: [cl_pointshop.lua:135] attempt to index field 'Config' (a nil value). I can't find anything to help me fix it though =( Thanks in advance. =D[/QUOTE] You do realize he's not working on this any more, right?
I did not =P thanks for telling me though
[QUOTE=nezdude;29083991]I did not =P thanks for telling me though[/QUOTE] Use Rev.61
[QUOTE=.\\Shadow};29077601]You do realize he's not working on this any more, right?[/QUOTE] So where do we download it.. or can't we anymore? The svn thing isn't working, i need a password. Never downloaded or used SVN's before lol
[QUOTE=beasty;29111465]So where do we download it.. or can't we anymore? The svn thing isn't working, i need a password. Never downloaded or used SVN's before lol[/QUOTE] You don't need a password. [url]http://www.facepunch.com/showthread.php?p=13583073[/url]
Used rev 61, exactly the same error and the same problem. Tried a few fixes. i.e. clearing my cache, deleting tons of random addons I've collected etc etc getting really annoyed now because i'm the only person on TTT that can't buy stuff =( please anyone!
It doesn't work when I try and sell items back, I reload the store and their still in my inventory, and I can keep reselling the item and earn heaps of points but I don't want that.
Good luck getting the author to try and fix it - He quit Lua scripting.
[QUOTE=soapfacee;29367210]It doesn't work when I try and sell items back, I reload the store and their still in my inventory, and I can keep reselling the item and earn heaps of points but I don't want that.[/QUOTE] Go back to Rev 61.
Can someone code a thrid person item into here please? :) Also this is AMAZING good work _Undefined!
I've removed the SVN. Latest and revision 61 downloads are in OP. Don't contact me about this. Ever.
There are just to many flaws, like when someone sells something it wont remove it.
[QUOTE=michael bombrp;29415645]There are just to many flaws, like when someone sells something it wont remove it.[/QUOTE] Grrrr return to rev 61 and everything will be working fine.
Rev 61 works for my server pritty fine now editing it a bit :)
PointShop has a new maintainer. [url=http://www.facepunch.com/members/245079-werewolf0020]werewolf0020[/url]
Awesome, thanks _Undefined
Submitted new revision So far the only issue its that after you buy or sell an item you have to manually close and open the pointshop window i swear ill fix this as soon as i can
I'm using this on my server but i keep having problems with it when i try to set points for myself. It ALWAYS comes back with this error "[addons\pointshop\lua\sv_pointshop.lua:166] attempt to call method 'IsAdmin' (a nil value)" Anyone able to help me? Please.
[QUOTE=Zombiedance;30038932]I'm using this on my server but i keep having problems with it when i try to set points for myself. It ALWAYS comes back with this error "[addons\pointshop\lua\sv_pointshop.lua:166] attempt to call method 'IsAdmin' (a nil value)" Anyone able to help me? Please.[/QUOTE] Your admin mod has removed the _R.Player:IsAdmin() function.
I installed ulx & ulib and it wont let me run any commands which admin system should i run?
[QUOTE=Zombiedance;30064659]I installed ulx & ulib and it wont let me run any commands which admin system should i run?[/QUOTE] This isn't related to the PointShop, you should post in the ULX thread.
[QUOTE=TheFireFox;29395760]Can someone code a thrid person item into here please? :) Also this is AMAZING good work _Undefined![/QUOTE] Added Also Added new revision And everything Works fine now (:
[QUOTE=.\\Shadow};30065802]This isn't related to the PointShop, you should post in the ULX thread.[/QUOTE] I'm talking about PointShop commands. Ex: ps_setpoints bleh bleh bleh
[QUOTE=Zombiedance;30068524]I'm talking about PointShop commands. Ex: ps_setpoints bleh bleh bleh[/QUOTE] You have to be set as an admin, then.
[QUOTE=.\\Shadow};30069244]You have to be set as an admin, then.[/QUOTE] I am the problem is I'm getting the error "[addons\pointshop\lua\sv_pointshop.lua:166] attempt to call method 'IsAdmin' (a nil value)" which _undefined said "Your admin mod has removed the _R.Player:IsAdmin() function. " Can someone who's using this tell me what there using as of right now?
Sorry, you need to Log In to post a reply to this thread.