• Vector and positions?
    6 replies, posted
Hey again everyone. I am making a function that resets a player to some default states: [lua] function GplayerSetRunner( ply ) ply:SetTeam(1) ply:SetModel("models/player/Group01/Male_0"..math.random(1,9)..".mdl") ply:SetMoveType(2) ply:SetRenderMode(RENDERMODE_NORMAL) ply:SetColor( Color(255, 255, 255, 255) ) ply:SetPos(--PROBLEM--) end [/lua] Now I got problems with the ply:SetPos() It expects a vector, not 3 position variables (x,y and z) How do I get a vector? ply:GetVector() doesn't exist :P Any solution? I could also go with ply:Spawn() (doesn't exist) that returns the player to the spawnpoint. Any solution would do. But I would much prefer getting the vector of the player, and then pasting it into ply:SetPos(vector) Any help is much appreciated! :D - Fillipuster
Basically do [code] ply:SetPos(Vector(NUMBER, NUMBER, NUMER)) [/code]
[QUOTE=NiandraLades;45602097]Basically do [code] ply:SetPos(Vector(NUMBER, NUMBER, NUMER)) [/code][/QUOTE] I see. Thanks :P - sorry for dumb...
[QUOTE=Fillipuster;45602129] - sorry for dumb...[/QUOTE] Seems to be a running trend in your posts...
[QUOTE=dingusnin;45602158]Seems to be a running trend in your posts...[/QUOTE] Indeed.. [t]http://puu.sh/aG6r4/16ed2cb880.png[/t] You should learn Lua, and not ask us every elementary thing you can find by simply [url=http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index3d06.html]googling and getting an entire tutorial on how vectors work[/url].
[QUOTE=Tomvdr;45602194]Indeed.. [t]http://puu.sh/aG6r4/16ed2cb880.png[/t] You should learn Lua, and not ask us every elementary thing you can find by simply [URL="http://maurits.tv/data/garrysmod/wiki/wiki.garrysmod.com/index3d06.html"]googling and getting an entire tutorial on how vectors work[/URL].[/QUOTE] I have nothing against people asking questions, and learning from what people tell them. But when you look at his posts, he wants to be spoon fed the answers. And even then, he will call [I]you[/I] dumb for [I]not explaining correctly[/I] when he doesn't understand.
I appreciate all the help I am getting. And if you did you research, (I believe) only 2 of my posts have obvious and dumb solutions. The other posts are a result of not being able to find an answer through either, googling, the glua docs, testing or guessing. If you don't wish to help, then don't ;) But I really do appreciate it. It helps a bunch! Thanks everyone :D
Sorry, you need to Log In to post a reply to this thread.