[QUOTE=.\\Shadow};37708834]How can I draw a png material in HUDPaint? (GM13)[/QUOTE]
[lua]surface.SetMaterial( Material( "icon16/accept.png" ) );
surface.SetDrawColor( Color( 255, 255, 255, 255 ) );
surface.DrawTexturedRect( 128, 128, 16, 16 );[/lua]
For some reason SetColor is required, else it doesn't render. <3
Lua physgun. Does anyone have one?
I am having an issue with an extension I am writing, to allow more interface between DarkRP and Expression 2 or Starfall.
And yes, quite a few of the functions in my tools I took the ideas for from other expression 2 addons I have seen in the past, but rewrote them all myself into one cohesive package.
I am working on a function to allow a chip to ask a player for money.
For some reason when it is run it is not opening the derma menu on the client who is being asked.
The file with askForMoney's definition:
[url]https://github.com/daranable/DarkRP-E2-Money/blob/master/lua/darkrp_scripting.lua[/url]
The file with the clientside derma (The derma I take no credit for, got it from a different implementation):
[url]https://github.com/daranable/DarkRP-E2-Money/blob/master/lua/cl_deduct.lua[/url]
I haven't been able to figure out why the Umsg would not be sending.
Thanks for any help you can offer.
[QUOTE=Crossu88;37707316] limit
[/QUOTE]
[url]http://i.imgur.com/NyhjV.png[/url]
[b]1 of 1[/b] and its only in your post
where does that code say you've reached a limit
[QUOTE=skar;37714280][url]http://i.imgur.com/NyhjV.png[/url]
[b]1 of 1[/b] and its only in your post
where does that code say you've reached a limit[/QUOTE]
There's probably some other variable defined [i]outside[/i] of the actual entity, that defines how many the player currently owns.
Also my guess is, when it's being removed; you need to negate the amount of pot plants owned.
Also since when was there a maximum amount of pot plants you can own? I've seen a warehouse full (;
[QUOTE=DaneSomdahl;37714697]There's probably some other variable defined [i]outside[/i] of the actual entity, that defines how many the player currently owns.
Also my guess is, when it's being removed; you need to negate the amount of pot plants owned.
Also since when was there a maximum amount of pot plants you can own? I've seen a warehouse full (;[/QUOTE]
it's always been that way and how can we fix it without changing that part?
[QUOTE=skar;37715118]it's always been that way and how can we fix it without changing that part?[/QUOTE]
By seeing what is being checked when it says you've reached your limit, and then being able to understand how you could control that variable when the entity is destroyed.
Is there any way in the GM13 beta to create custom surfaceproperties via Lua now that they have been removed from the scripts folder?
Now whenever I use a car that uses one of the custom surface properties and I hit the handbrake while going fast it crashes the server.
[QUOTE=DaneSomdahl;37715877]By seeing what is being checked when it says you've reached your limit, and then being able to understand how you could control that variable when the entity is destroyed.[/QUOTE]
how the fuck am i going to see what's being checked when the limit is reached if i can't see where it says you've reached the limit?
are you retarded?
[lua]local function ccGodModeOn( ply )
if not ply:HasPriv(ADMIN) then ply:PrintMessage(2, string.format(LANGUAGE.need_admin, "rp_godmodeon"))
return
end
if ply:HasPriv(ADMIN) then
ply:GodEnable()
end
end
concommand.Add("rp_godmodeon", ccGodModeOn)
local function ccGodModeOff( ply )
if not ply:HasPriv(ADMIN) then ply:PrintMessage(2, string.format(LANGUAGE.need_admin, "rp_godmodeoff"))
return
end
if ply:HasPriv(ADMIN) then
ply:GodDisable()
end
end
concommand.Add("rp_godmodeoff", ccGodModeOff)
[/lua]
How can I turn this into a toggle?
[QUOTE=Bubka3;37716485][lua]local function ccGodModeOn( ply )
if not ply:HasPriv(ADMIN) then ply:PrintMessage(2, string.format(LANGUAGE.need_admin, "rp_godmodeon"))
return
end
if ply:HasPriv(ADMIN) then
ply:GodEnable()
end
end
concommand.Add("rp_godmodeon", ccGodModeOn)
local function ccGodModeOff( ply )
if not ply:HasPriv(ADMIN) then ply:PrintMessage(2, string.format(LANGUAGE.need_admin, "rp_godmodeoff"))
return
end
if ply:HasPriv(ADMIN) then
ply:GodDisable()
end
end
concommand.Add("rp_godmodeoff", ccGodModeOff)
[/lua]
How can I turn this into a toggle?[/QUOTE]
if god then ply:GodDisable(); god = false end
[QUOTE=skar;37715962]how the fuck am i going to see what's being checked when the limit is reached if i can't see where it says you've reached the limit?
are you retarded?[/QUOTE]
It's not going to be handled in the entity, you should open all the .lua files within your /gamemode/ folder and search for the message that says you've reached the limit.
[QUOTE=DaneSomdahl;37716984]It's not going to be handled in the entity, you should open all the .lua files within your /gamemode/ folder and search for the message that says you've reached the limit.[/QUOTE]
which is exactly why i said [url=http://facepunch.com/showthread.php?t=1160598&p=37714280&viewfull=1#post37714280]this[/url], which you rated dumb
then i asked how i was supposed to fix his code without seeing the function that does that, which you decided to explain how i could do that [url=http://facepunch.com/showthread.php?t=1160598&p=37715877&viewfull=1#post37715877]here[/url], which is why i called you retarded, which brings me back to this question
are you fucking retarded?
[QUOTE=skar;37717030]which is exactly why i said [url=http://facepunch.com/showthread.php?t=1160598&p=37714280&viewfull=1#post37714280]this[/url], which you rated dumb
then i asked how i was supposed to fix his code without seeing the function that does that, which you decided to explain how i could do that [url=http://facepunch.com/showthread.php?t=1160598&p=37715877&viewfull=1#post37715877]here[/url], which is why i called you retarded, which brings me back to this question
are you fucking retarded?[/QUOTE]
No I'm not retarded, but I do believe there was a miscommunication.
[QUOTE=DaneSomdahl;37717040]No I'm not retarded, but I do believe there was a miscommunication.[/QUOTE]
there was no miscommunication, you're just too incompetent to understand what i said to begin with
[QUOTE=skar;37717085]there was no miscommunication, you're just too incompetent to understand what i said to begin with[/QUOTE]
I didn't have to try to help.
I don't believe you were explicit enough about what you were talking about either though.
[QUOTE=DaneSomdahl;37717114]I didn't have to try to help.
I don't believe you were explicit enough about what you were talking about either though.[/QUOTE]
after the second post you should have understood
[QUOTE=skar;37717085]there was no miscommunication, you're just too incompetent to understand what i said to begin with[/QUOTE]
I don't really think you have any right at your level of programming to be calling anyone on this forumn incompetent. :getout:
[QUOTE=JustSoFaded;37717440]I don't really think you have any right at your level of programming to be calling anyone on this forumn incompetent. :getout:[/QUOTE]
why arent you on steam fgt
[editline]18th September 2012[/editline]
[url=http://i.imgur.com/WQA7H.png]nevermind[/url]
[highlight](User was banned for this post ("Flaming and shitposting." - Swebonny))[/highlight]
Is there any way to get how long a sound is? Making a radial menu for player speech and don't want to have to manually put it...
[editline]18th September 2012[/editline]
-snip-
Never mind, ended up using CreateSound.
[QUOTE=shadowndacorner;37719526]Is there any way to get how long a sound is? Making a radial menu for player speech and don't want to have to manually put it...
[editline]18th September 2012[/editline]
-snip-
Never mind, ended up using CreateSound.[/QUOTE]
You can also use SoundDuration(); to get the duration of a .wav audio file just for future reference. :)
@skar & DaneSomdahl I just read through what both of you said two times and I don't understand what either one of you are on about
EDIT: ok now I think I see: DaneSomdahl says the guy needs to go check the file that spawns those entities (like a tool or whatever) for the limit checks. And idk what skar is on about
[QUOTE=Divran;37720876]@skar & DaneSomdahl I just read through what both of you said two times and I don't understand what either one of you are on about
EDIT: ok now I think I see: DaneSomdahl says the guy needs to go check the file that spawns those entities (like a tool or whatever) for the limit checks. And idk what skar is on about[/QUOTE]
Some problem about not being able to spawn more weed plants after you've reached the maximum, I assume that the amount that the player owned wasn't being deducted on the removal of the plant.
So I was trying to help guide whoever it was that needed the help.
I am having trouble with the FinishedURL callback.
Code:
[lua]
local HtmlFrame = vgui.Create("HTML")
HtmlFrame:SetSize(ScrW() - 10, ScrH() - 50)
HtmlFrame:Center()
HtmlFrame:OpenURL("http://google.com/")
HtmlFrame:SetParent( Frame )
function HtmlFrame:FinishedURL(url)
print("Loaded: "..url)
end
[/lua]
Console output:
[code]
LoadURL: [http://google.com/]
[/code]
FinishedURL is being called, however its proceeding function is not.
Any ideas?
When it comes to Pointshop, there are two issues I'm having right now. One is because I run a TTT server, when people disguise it does not hide their model. I'm not sure how to make it so when they use the disguiser it reverts their model to the maps default. Another I have is how to add an equip/unequip option the store. I want to start having the ability to allow players to buy multiple models and equip them at will, so they start using up their points. I appreciate any help the community can give me.
Is there a faster alternative to lua_reloadents?
I just want to make some changes to the init.lua or cl_init.lua and reload one specific entity, without having to wait for the rest of them (and without breaking the spawned instances of other entities).
[QUOTE=Nikita;37729397]Is there a faster alternative to lua_reloadents?
I just want to make some changes to the init.lua or cl_init.lua and reload one specific entity, without having to wait for the rest of them (and without breaking the spawned instances of other entities).[/QUOTE]
TomyLobo made a lua_reloadent (note the missing "s", it's singular).
Here it is: [url]http://www.facepunch.com/showthread.php?t=769149[/url]
I know you can pack all sorts of stuff into a map file, but could you pack lua files?
EDIT: Googled it.
[QUOTE=Banana Lord.;37699885]what hook are you calling it in[/QUOTE]
ENT:Draw()
Sorry, you need to Log In to post a reply to this thread.