Changing the spawn pos with code [DarkRP]

im trying to make it where on initial spawn you spawn in one building and on every other spawn u spawn at a different building i know the hooks i just dont know what to use to set the pos with code, i know you can set it ingame with /setspawn and /addspawn

srsly try to understand the code. this time i won’t spoonfeed you.

:suicide:

[editline]16th October 2014[/editline]

i’m trying to learn a ton of lua for a big project i want to code from scratch. have not slept in days! i can’t read thru lines of code that i don’t understand

[editline]16th October 2014[/editline]

teach me the ways cause when i read that code all i see is


darkrp[tons of checks and math here]\[table and other big numbers i cant count to here] = myfave[rapsong, spawnpos] //this line makes you milkshake end 

u got the information how to run something on first spawn
http://forum.facepunch.com/showthread.php?t=1431338
u know the hook and the way how DarkRP Do it.

´

soo maybe local pos = vector hook.add if nwbool then return pos end?

i dont mean first soawn i mean like playerinitialspawn() and playerspawn() i wanted on initial to be one place and onspawn to be a different place so inside a hook fir each one would i change the spawn pos?

Just use the PlayerSpawn hook to TP someone where you want.

[editline]16th October 2014[/editline]

You could just add a check as well if you wanted someone to get teleported to one place once, and another place the rest of the time by assigning a variable to the player, for example
[Lua]
if ply.AlreadyTpd then
– Go other place
else
– Go to first spawn
ply.AlreadyTpd = 1
end
[/lua]
When you have a problem, rather than going straight to facepunch, check the wiki thoroughly, then apply basic logic to your task.

as i said before i have trouble reading some code and looking at wiki. i only learn when i see the code i need and then i understand how it works and how to use it. but just getting parts of code from complete different scripts and trying to make it work with sonthing that idk what it is is hard

And I have trouble reading your posts, please use correct grammar so I can somewhat make sense of what you’re saying.

if you are going to be a ass hole on facepunch please get a life and just dont reply onmy threds