1. How do I make a "beam" from the player's muzzle to his aimpos?
2. How do I use text files as a "databases"?
3. How do I make a vector...relative...to an entity...such as...Z is up/down of the ent, not the world?
4. How fast does SetVelocity reach that vector?
1. [url]http://wiki.garrysmod.com/?title=Render.DrawBeam[/url]
2. Write to the text file in a certain way so that when you read it, it makes sense. For example, if you wanted to store a player's name and steamID, you could separate put it in this format:
[code]Entoros STEAM:WHATEVER
braxus STEAM:WHATEVER[/code]
From there you could use string.Explode to iterate over newlines/spaces.
3. Something like this:
[code]local worldvec = entity:GetPos()
local localvec = Vector( 0, 0, 10 )
localvec = worldvec + localvec[/code]
Basically, you get the "local" vector of ten units above an entity by adding the local vector to the world vector.
Thanks.
[editline]08:48PM[/editline]
How do I make it so something happens when a particle touches something?
[editline]08:58PM[/editline]
So I can make a SWEP that shoots particles and when the particles hit a player it deals damage.
Sorry, you need to Log In to post a reply to this thread.