MontiVante Posted October 14, 2017 Share Posted October 14, 2017 Hi, I'm asking for help for a script that I think is good, something I want to do with the script is to be able to spawn, for players it's not a spawnpoint, not that. EXAMPLE: I want it when a player logs in in a place of appearance and when he dies appears in the hospital, because the spawn is not spawnpoint help please the script does not want me to serve. function Logiin (thePlayer) setElementPosition ( thePlayer, X, Y, Z ) end addEventHandler ("onPlayerLogin", getRootElement (), Logiin) Link to comment
WorthlessCynomys Posted October 15, 2017 Share Posted October 15, 2017 Use spawnPlayer Instead of setElementPosition Link to comment
W4LK1NG Posted October 15, 2017 Share Posted October 15, 2017 Use This function Logiin (thePlayer) spawnPlayer ( thePlayer, X,Y,Z ) --spawnPlayer ( thePlayer, X,Y,Z,rotation,IDSkin,Interior,Dimension,Team ) Possible arguments end addEventHandler ("onPlayerLogin", getRootElement (), Logiin) If it doesn't work there's another resource giving conflict Link to comment
Ahmed Ly Posted October 16, 2017 Share Posted October 16, 2017 (edited) thePlayer? remove thePlayer at line 2 and 3 and write source 15 hours ago, W4LK1NG said: Use This function Logiin (thePlayer) spawnPlayer ( thePlayer, X,Y,Z ) --spawnPlayer ( thePlayer, X,Y,Z,rotation,IDSkin,Interior,Dimension,Team ) Possible arguments end addEventHandler ("onPlayerLogin", getRootElement (), Logiin) Quote Edited October 16, 2017 by Ahmed Ly Link to comment
MontiVante Posted October 16, 2017 Author Share Posted October 16, 2017 okey Ahmed Ly Link to comment
W4LK1NG Posted October 16, 2017 Share Posted October 16, 2017 12 hours ago, Ahmed Ly said: thePlayer? remove thePlayer at line 2 and 3 and write source Bro, it's like I said the other day, the Script doesn't want to know what you wrote there in the first argument will always be the same as the font, has people who uses "thePlayer" other use "source" I usually use "jog" abbreviation for "jogador", no matter what ta there , always see the event arguments Link to comment
Ahmed Ly Posted October 17, 2017 Share Posted October 17, 2017 13 hours ago, W4LK1NG said: Bro, it's like I said the other day, the Script doesn't want to know what you wrote there in the first argument will always be the same as the font, has people who uses "thePlayer" other use "source" I usually use "jog" abbreviation for "jogador", no matter what ta there , always see the event arguments Link to comment
^iiEcoo'x_) Posted October 17, 2017 Share Posted October 17, 2017 (edited) addEventHandler ( 'onPlayerLogin' , root , function ( ) setElementPosition ( source , x , y , z ) end ) Edited October 17, 2017 by DABL Link to comment
W4LK1NG Posted October 18, 2017 Share Posted October 18, 2017 18 hours ago, Ahmed Ly said: Ahh Yes, in the case of onPlayerLogin actually the arguments change as other events as well, as I said "see always the arguments of the event" Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now