What do you need help with? JUNE

JUNE 2012 EDITION

Like WayWo this was supposed to have a new thread every month. But it was never made. But alas, we have returned in June!

**COOL STUFF TO LOOK AT!
**General Faqs: http://www.facepunch.com/threads/868561-Need-help-READ-THIS-FIRST
HOW TO LUA?: http://wiki.garrysmod.com/?title=Lua_Tutorial_Series
(OLD) GLUA WIKI: http://wiki.garrysmod.com
LUA SEARCH: http://luasearch.remscar.com
Temp Lua Wiki: http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index4875.html?title=Main_Page

How to clip texture like Max Payne or something?
Is there any command for this?

I am wondering if anyone can fix this code so that it only opens up one reason box when you right click. At the moment when you right click whilst looking at a player it opens 3 or 4 reason boxes when im looking for it to just open one. Here is the code.

[lua] function SWEP:SecondaryAttack()
self:SetNextSecondaryFire(CurTime() +1);
local trace = self.Owner:GetEyeTrace()
if trace.Entity:IsPlayer() then
Derma_StringRequest(“wanted reason”, “Enter the reason to arrest this player”, “”, function(Reason)
LocalPlayer():ConCommand("say /wanted “… trace.Entity:UserID()…” "… Reason)
end)
end
end [/lua]

Post a reply here or add me on steam if you need more information. Steam = http://steamcommunity.com/profiles/76561198005643722/

Thanks Toby

This is different to my other post in last topic

Anyone know about this? Or even other ways around it.

**[Render.SetScissorRect

http://wiki.garrysmod.com/favicon.ico](http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index54c2.html?title=Render.SetScissorRect)**

**I **am in need of someone that has experience with OpenAura. We’re a upcoming community that will host Metro 2033 Serious roleplay.
We have pretty much everything, all the player models and props ported from the game, our own map finished, and some custom plugins.
But we’re still in need of some new plugins so if you’re intrested then add me.

If you would like to know more about our upcoming community, check out our steam group: http://steamcommunity.com/groups/avox-gaming

Regards, Tokiz

(Some old pics from our old server)
http://cloud.steampowered.com/ugc/648746351822946487/03074CA4099CD8ACB7CBEAFD932BB17EB80418C9/
http://cloud.steampowered.com/ugc/648746351822951219/54084570401E392D64EEC2273E1F021515CE6C6A/
http://cloud.steampowered.com/ugc/648746351822935497/09DF28C585D7C13AED9B2A9E2BF7683487B088E3/
http://cloud.steampowered.com/ugc/648746351822948501/9BD0D4A6BDEE42B35C7CC1954B56423A7E028024/
http://cloud-2.steampowered.com/ugc/648743808115860295/C390B69E3F07931DC7B2F04985F76368A9433429/
http://cloud-2.steampowered.com/ugc/648745092171770037/5F52875A8EDA91D2689A05AD16F0B22CC167CFDB/

I have a hopefully quick question, what is the function of “render.CopyTexture(from, to)”?

I’ve tried playing around with it, to copy a renderer to a texture, but failed:



local from = GetRenderTarget("GModToolgunScreen", 256, 256)
local to = Material("ash47/mytexture"):GetMaterialTexture("$basetexture")

render.CopyTexture(from, to)


Obviously I’m doing something wrong, feel free to tell me what I’m missing…

I’m simply running this code as is, using lua_openscript_cl, perhaps it needs to be in a hook somewhere?

I am trying to make my own scripted chair/vehicle using Lua, and I cant seem to find any information on doing so…

Thread Here:
http://www.facepunch.com/showthread.php?t=1187717

Anyone have any success getting traces to hit custom PhysicsInitBox’s?
I know you can create Physics from a Mesh table but not sure how to go about that. I have the physics that I want… just traces aren’t hitting it.

Did you try SOLID_BBOX and adding CONTENTS_HITBOX to the trace’s mask?

I was wondering if anyone could fix this so Admins+ can touch peoples props as well

[lua]function _R.Player:CanTouch( objEnt )
if( objEnt:IsPlayer( ) ) then return false; end
if( objEnt.CPPIControlled ) then
if( objEnt:CPPIGetOwner( ) ) then
local objOwner = player.GetByUniqueID( objEnt:CPPIGetOwner( ) );
return objOwner && objOwner:IsBuddy( self ) || false;
end
end
return false;
end[/lua]

Sweet, that worked, thanks.

However now the physbeam freaks out on it =P Not that big of a deal but still annoying

This has happened once before, but… I forgot what I did to fix it.

why does this look like the exact same thing as my beta prop protection on the Steam workshop?

[editline]3rd June 2012[/editline]

as in,

http://www.bananatree.im/i/FzWYkeEr8xN.png

Does anyone know how to do those little lightning balls?

How to make table, that is in an autorun, to visible any other entity? Because PrintTable gives results only in the lua that is in autorun folder.

I have this code here that i am using to make so you right click with an arrest baton to make the person your looking at wanted.

[lua]function SWEP:SecondaryAttack()
self:SetNextSecondaryFire(CurTime() +1);
local trace = self.Owner:GetEyeTrace()
if trace.Entity:IsPlayer() then
Derma_StringRequest(“wanted reason”, “Enter the reason to arrest this player”, “”, function(Reason)
self.Owner:ConCommand("say /wanted “… trace.Entity:UserID()…” "… Reason)
end)
end
end [/lua]

It currently opens 2/3 reason boxes and also gives this error in console (thay may be connected, im unsure). Can anyone tell me how to fix this?

ERROR:
[gamemodes\darkrp\entities\weapons\arrest_stick\shared.lua:151] attempt to call
global ‘Derma_StringRequest’ (a nil value)

Thanks Toby

what the fuck am I hearing, whale mating?

[editline]3rd June 2012[/editline]

in all seriousness it looks like particle effects

[lua]function SWEP:SecondaryAttack()
self:SetNextSecondaryFire(CurTime() + 1);

if (CLIENT) then
	local trace = LocalPlayer():GetEyeTraceNoCursor();
	local entity = trace.Entity;

	if ( IsValid(entity) and entity:IsPlayer() ) then
			local function Callback(reason)
				LocalPlayer():ConCommand( "say /wanted "..entity:UserID().." "..tostring(reason) );
			end;

			Derma_StringRequest("wanted reason", "What is the reason?", "Reason", Callback);
		end;
	end;
end;

end;[/lua]

1337th Post!

Found out, they are particle effects.

Is there a way to make them spin around me? And keep up if i walk or something.

[lua]
local centr = Vector(0,0,100)
local em = ParticleEmitter(centr)
for i=1, 20 do
local part = em:Add(“sprites/orangecore1”,centr)
if part then
part:SetColor(155,255,255,math.random(255))
part:SetPos(LocalPlayer():GetPos() + Vector(0,0,math.sin(CurTime()*25)))
part:SetDieTime(15)
part:SetStartSize(50)
part:SetEndSize(0)
end
end
em:Finish()

[/lua]

I’m using that code atm.