Is there a way to run gmod on my laptop & desktop at the same time with only one purchased copy? If I connect to my local server on the laptop in Offline mode I'll eventually get kicked for unable to connect to VAC servers. If I'm not on offline mode the game eventually closes because two people are playing the same shared game. Same thing will happen with Sandboxie
The entity is just a "prop_physics" spawned from the spawnmenu. I'm trying get it so that the tooltip will only display if I have the tool equipped. I'm putting
[CODE]function analyzeThink()
local trace = self.GetOwner():GetEyeTrace()
if(CLIENT and trace.Entity:IsValid() and trace.Entity:GetClass() == "prop_physics") then
AddWorldTip( trace.Entity:EntIndex(), "What you want?", 0.5, trace.Entity:GetPos(), trace.Entity )
halo.Add( { trace.Entity }, Color( 255, 255, 255, 255 ), 1, 1, 1, true, true )
end
end
hook.Add("Think", "analyzeThink", analyzeThink)[/CODE]
inside "lua\weapons\gmod_tool\stools\mytool.lua", but I get the error "attempt to index global 'self' (a nil value)".
[QUOTE=Crayz;46595454]Is there a way to run gmod on my laptop & desktop at the same time with only one purchased copy? If I connect to my local server on the laptop in Offline mode I'll eventually get kicked for unable to connect to VAC servers. If I'm not on offline mode the game eventually closes because two people are playing the same shared game. Same thing will happen with Sandboxie[/QUOTE]
Run this command on your server:
sv_lan 1
Then you can join without any issues. I use that plus -insecure. Willox also recently posted that you can add these launch options: -multirun -steam to hl2.exe in your garrysmod folder if you want to run more than 1 instance of gmod on the same computer.
What exactly does this function do, and how do I use it? [url]http://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim[/url]
One source said the string of an anim name, the other says boolean for the argument. Tried setting it to false, and vehicles still play the entry animation.
[QUOTE=Crayz;46595454]Is there a way to run gmod on my laptop & desktop at the same time with only one purchased copy? If I connect to my local server on the laptop in Offline mode I'll eventually get kicked for unable to connect to VAC servers. If I'm not on offline mode the game eventually closes because two people are playing the same shared game. Same thing will happen with Sandboxie[/QUOTE]
Use offline mode on one the paid account. I think that's what worked for me.
- snip -
[editline]29th November 2014[/editline]
[QUOTE=Revenge282;46598160]What exactly does this function do, and how do I use it? [url]http://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim[/url]
One source said the string of an anim name, the other says boolean for the argument. Tried setting it to false, and vehicles still play the entry animation.[/QUOTE]
You've tested boolean values, but have you tested strings yet? To set a custom animation? Also, have you tried to see what using true does? The wiki doesn't seem to state what the default value is. It'd be dumb if setting that to true disables the animation, but you never know.
[QUOTE=Revenge282;46598160]What exactly does this function do, and how do I use it? [url]http://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim[/url]
One source said the string of an anim name, the other says boolean for the argument. Tried setting it to false, and vehicles still play the entry animation.[/QUOTE]
I asked about it too: [url]http://facepunch.com/showthread.php?t=1374457&p=46554076&viewfull=1#post46554076[/url]
[url]http://facepunch.com/showthread.php?t=1374457&p=46555292&viewfull=1#post46555292[/url]
[url]http://facepunch.com/showthread.php?t=1374457&p=46568068&viewfull=1#post46568068[/url]
[url]http://facepunch.com/showthread.php?t=1374457&p=46570168&viewfull=1#post46570168[/url]
[url]http://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim[/url]
While previously it may have been a string... Robot updated it to be a boolean. I'm not sure if the vehicle itself needs the entry animation ( like Sickness or Master Chris old charger which opens the door and the player sits in the air and slides in ) for it to work though.
[QUOTE=Acecool;46598359]I asked about it too: [URL]http://facepunch.com/showthread.php?t=1374457&p=46554076&viewfull=1#post46554076[/URL]
[URL]http://facepunch.com/showthread.php?t=1374457&p=46555292&viewfull=1#post46555292[/URL]
[URL]http://facepunch.com/showthread.php?t=1374457&p=46568068&viewfull=1#post46568068[/URL]
[URL]http://facepunch.com/showthread.php?t=1374457&p=46570168&viewfull=1#post46570168[/URL]
[URL]http://wiki.garrysmod.com/page/Vehicle/SetVehicleEntryAnim[/URL]
While previously it may have been a string... Robot updated it to be a boolean. I'm not sure if the vehicle itself needs the entry animation ( like Sickness or Master Chris old charger which opens the door and the player sits in the air and slides in ) for it to work though.[/QUOTE]
Tested with TDM vehicles that had entry animations, as well as those that didn't. Setting it to true for those that didn't had no effect. Setting to false for those that did have the animation also did nothing.
As far as testing with strings, I don't know of any valid values to test it with.
[QUOTE=Crayz;46595454]Is there a way to run gmod on my laptop & desktop at the same time with only one purchased copy? If I connect to my local server on the laptop in Offline mode I'll eventually get kicked for unable to connect to VAC servers. If I'm not on offline mode the game eventually closes because two people are playing the same shared game. Same thing will happen with Sandboxie[/QUOTE]
Taken from the WAYWO thread:
[QUOTE=Willox;46573492]You can run two instances on a single Steam account by just going to the GarrysMod directory and executing "hl2.exe -multirun -steam".
You'll need sv_lan 1 set on the srcds instance or listen server.
[IMG]http://i.imgur.com/BuOGyHE.png[/IMG][/QUOTE]
Another thing:
Does anyone have any higher res (512+) fire particles/sprites? I made a new particle effect for fire, but holy shit, it looks terrible...
(It's for larger flames, like those of a car fire/large burn)
Does GMod have special load order in terms of addons (except a..b..c)?
I want one addon to share some informations as globalized variables across the other addons, the problem is that other addon's who actually need the information are loaded before that one that provides them and i'm not sure about naming my addon a_ or 0_ smth as i don't know how reliable that is.
any suggestion would be nice ;>
So I'm working on a simple little script that prevents team killing, for DarkRP, to be used for Police vs Police shit.
Could someone tell me why this doesn't work?
[code]function GM:PlayerShouldTakeDamage( ply, victim )
if ply:IsPlayer() then
if ply:Team() == victim:Team() then
return false
end
end
return true
end[/code]
Nevermind, I fixed it. Had to put this into init.lua.
[editline]29th November 2014[/editline]
How would I get teams from a certain gamemode, like DarkRP?
[code]function GM:PlayerShouldTakeDamage( ply, victim )
if ply:IsPlayer() then
if ply:Team() == TEAM_POLICE then
return false
end
end
return true
end[/code]
This is just an example, I'm basically trying to setup where Police won't be able to hurt the Mayor, or other Police, and the Mayor won't be able to hurt Police.
What's the difference between NWInt and PData? I know that PData is server-side only but is there an utility to using it instead of just using nwint?
Anyone can help me with DarkRP?
My huds money says "$" but has no numbers after it and I don't recieve paydays
[QUOTE=bilbasio;46601754]What's the difference between NWInt and PData? I know that PData is server-side only but is there an utility to using it instead of just using nwint?[/QUOTE]
PData is set on players only and saved to the server sqlite database.
NW*s don't persist
Also
|
v
[QUOTE=zerf;46602761]PData is set on players only and saved to the server sqlite database.
NW*s don't persist[/QUOTE]
PData is also not networked IIRC
[QUOTE=Fannney';46600603]Does GMod have special load order in terms of addons (except a..b..c)?
I want one addon to share some informations as globalized variables across the other addons, the problem is that other addon's who actually need the information are loaded before that one that provides them and i'm not sure about naming my addon a_ or 0_ smth as i don't know how reliable that is.
any suggestion would be nice ;>[/QUOTE]
You could set it up so that the addon which creates the data calls a function and the addon which utilises the data doesn't do anything until the function is called.
So it's pretty much useless to use pdata if I'm using an external mysql database?
[QUOTE=bilbasio;46604478]So it's pretty much useless to use pdata if I'm using an external mysql database?[/QUOTE]
PData is really just there to provide an alternative.
I need help with Vectors and Angles.
[lua] local physics = physenv.GetPerformanceSettings( )
local EyeTrace = self.Owner:GetEyeTrace()
local XSpread = math.Rand(-Spread.x,Spread.x)
local YSpread = math.Rand(-Spread.y,Spread.y)
local EyeA = self.Owner:EyeAngles()
local Offset = EyeA:Forward()*-20 + EyeA:Right()*8 + EyeA:Up()*-3
local APSpread = EyeA:Right()*XSpread + EyeA:Up()*YSpread*500
local VelSpread = EyeA:Right()*XSpread + EyeA:Up()*YSpread
local Velocity = physics.MaxVelocity
local ApplyForceCenterMethod = (EyeTrace.HitPos - self.Owner:GetShootPos() - Offset - VelSpread - self.Owner:GetPunchAngle():Up() ) * Velocity
local SetVelocityMethod = Velocity * (Dir + VelSpread)
--Dir is (self.Owner:EyeAngles() + self.Owner:GetPunchAngle()):Forward()
local bullet = ents.Create("ent_cs_bullet")
bullet:SetPos(self.Owner:GetShootPos() + Offset)
bullet:SetAngles(EyeA)
bullet:SetNWInt("Damage",Damage)
bullet:Spawn()
bullet:SetOwner(self.Owner)
--bullet:GetPhysicsObject():ApplyForceCenter( ApplyForceCenterMethod )
bullet:GetPhysicsObject():SetVelocity( SetVelocityMethod )[/lua]
I'm trying to create physical bullets but they're not working out for me. I've tried 2 methods but I'm stuck on both.
The two methods I've been using are SetVelocity() and ApplyForceCenter() but each has it's own little problem. If someone could get one of them working, that would be great.
I want it so it has all these elements in my SWEP base:
- Grabs the ViewPunch and makes it so it adds to the direction of the viewpunch
- Dynamic Cone
- Bullets go to where I aim
But each method doesn't allow all of them.
For the SetVelocity Method, it has dynamic cone, it can use the calculated viewpunch, but the bullets are offset and I don't know how to fix that
For the ApplyForce Method, it has a dynamic cone, it can't use the calculated viewpunch, and the bullets go where I aim.
is it possible to make these useable? HTML embedded in DPanel:
[url]http://zippy.gfycat.com/BleakClearcutGermanshorthairedpointer.webm[/url]
i dont know how to embed webm
[QUOTE=Epitaph;46601818]Anyone can help me with DarkRP?
My huds money says "$" but has no numbers after it and I don't recieve paydays[/QUOTE]
Try using the latest version of unmodified DarkRP
Is there a function or hook to check if the player is in the air?
[QUOTE=_Entity;46607265]Is there a function or hook to check if the player is in the air?[/QUOTE]
[url]http://wiki.garrysmod.com/page/Entity/IsOnGround[/url]
or
[url]http://wiki.garrysmod.com/page/Entity/OnGround[/url]
Not sure if one works over the other.
[img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Entity/IsOnGround]Entity:IsOnGround[/url]
[editline]30th November 2014[/editline]
ninjas
[QUOTE=Pandaman09;46607307][url]http://wiki.garrysmod.com/page/Entity/IsOnGround[/url]
or
[url]http://wiki.garrysmod.com/page/Entity/OnGround[/url]
Not sure if one works over the other.[/QUOTE]
willox told me OnGround will be more accurate/better.
OnGround checks if the entity has the FL_ONGROUND flag. IsOnGround checks that the ground entity of the entity is valid.
I'd choose the FL_ONGROUND method over the other because it's probably less expensive and is what is used by physics/movement processing.
-solved-
[QUOTE=sarge997;46600682]anti teamkill[/QUOTE]
Take a look at this: [url]https://dl.dropboxusercontent.com/u/26074909/tutoring/_systems/anti_teamkill_system.lua.html[/url]
[QUOTE=ROFLBURGER;46605456]physical bullets[/QUOTE]
Entities have a sort of speed-limit in source. You can get around that by manually calculating distance, and setpos'ing the entity and performing checks along the path between the old position and the new position to see if it hit something.
I wouldn't use view-punch, mainly because it don't modify the direction the player is looking. I'd recommend modifying the GetEyeAngles which will change where the player is looking and where the bullet will follow...
For your dynamic cone, you, on top of the eye angles, could simply take the aim vector / angle and rotate around axis... Another option is to consider how to do it in a 2d game ( where you have the point x, y and you add a random value +/- on the x and y to make it change ) and apply it to 3d by modifying the aim angle pitch and yaw which is up/down left/right ever so slightly and then you may need to normalize it to pass it into the bullet system.
As for the bullets being offset in the viewpunch method, it is because the view isn't being moved most likely.
Just modify the angles / rotate around axis a very small amount before normalizing it and it should work.
I don't think this is the place for this but does anyone remember a script that would save any spawned props in a vmf file that you could use to give more detail in maps your making?
Sorry, you need to Log In to post a reply to this thread.