lexagav[RUS] Posted April 9, 2009 Share Posted April 9, 2009 I wanted to do a easy script. This script is when player enter marker gate open ad when player exit marker close gate. I try to do it many times but i cant!!!There is my script: function loadObjects() Gate = createObject( 986, 321.32440185547, -1188.1290283203, 77.13875579834, 0, 0, 38.368804931641 ) marker = createMarker( 320.8876953125, -1187.8742675781, 75.522003173828, "cylinder", 6, 0, 255, 1, 1 ) end addEventHandler("onResourceStart", getRootElement(), loadObjects) function playerEnterMarker ( marker ) if ( Playeris ( lexagav[RUS] ) ) or ( Playeris ( skydj[RUS] ) ) then addEvent = moveObjects(Gate, 5000, 321.32440185547 , -1188.1290283203, 77.13875579834) end end addEventHandler("onResourceStart", getRootElement(), moveobjects) But it DOESNT WORK!!!!!!!!!!!!!!!!!!!Help pls!!!!!!!! Link to comment
lexagav[RUS] Posted April 9, 2009 Author Share Posted April 9, 2009 Script is not finished I just want to open gate but i cant do it!!!!!And i want to do gates for all players not only for this who is in my script!!!HElp!!! Link to comment
robhol Posted April 9, 2009 Share Posted April 9, 2009 You can't just write random bullshit in your code and expect it to work. Go to the wiki, read the basics. I could piss more coherent code in snow, for god's sake. Also, spamming question and exclamation marks and bumping your topic after 7 minutes isn't going to get you any more help - just make you look retarded and probably make people not want to help you. Link to comment
Gamesnert Posted April 9, 2009 Share Posted April 9, 2009 Besides that, wrong section. (correct one) Link to comment
lexagav[RUS] Posted April 10, 2009 Author Share Posted April 10, 2009 Thanks but i already do the gates!!! I read basic and all was easy now!!!!!!!!!!!!! Link to comment
lexagav[RUS] Posted April 10, 2009 Author Share Posted April 10, 2009 And i have another question!!I read all wiki but i cant find information about spawnpoint in freeroam!!Help pls!!!! Link to comment
Gamesnert Posted April 10, 2009 Share Posted April 10, 2009 Could you please ask in a normal way? I doubt anyone will help you like this, especially since robhol already mentioned this. Oh and rephrase your question, I don't even understand WHAT you need... Link to comment
lexagav[RUS] Posted April 11, 2009 Author Share Posted April 11, 2009 I want to spawn players on the coordinates 298.2 -1156.8 80.9 in freeroam gamemode but i cant do this!!!!! Link to comment
lexagav[RUS] Posted April 11, 2009 Author Share Posted April 11, 2009 I want to spawn players on the coordinates 298.2 -1156.8 80.9 when they join. I do this in dm but in freeroam gamemode i cant!!!!! Link to comment
Gamesnert Posted April 11, 2009 Share Posted April 11, 2009 1. Do not spam "!!!!" all the time. 2. Do not double post, ever wondered why there's an "Edit" button? I guess not. 3. What freeroam... Freeroam GUI? The beauty of that resource is that you can spawn wherever you like, why should you make a spawnpoint... Link to comment
lexagav[RUS] Posted April 12, 2009 Author Share Posted April 12, 2009 No i dont want to close teleport function.I just want to spawn players when they join like on server Lainelaitos Link to comment
Gamesnert Posted April 12, 2009 Share Posted April 12, 2009 Now that's more like it. You can make a new script file inside freeroam resource, with onPlayerJoin and spawnPlayer. That should make the player spawn in the beginning, without having to disable the teleporting. Link to comment
Dark Dragon Posted April 12, 2009 Share Posted April 12, 2009 i guess onClientResourceStart would be a better choice, but the gui window would still pop up, wouldn't it? Link to comment
Gamesnert Posted April 12, 2009 Share Posted April 12, 2009 Afaik it doesn't pop-up on join. And eh, spawnPlayer doesn't work client-side... Link to comment
lexagav[RUS] Posted April 13, 2009 Author Share Posted April 13, 2009 I do this script with your events but he doest work! Veiv my script and configure it if you can! function spawn ( source, player ) local joinedPlayerName = getClientName ( source ) spawnPlayer( .. joinedPlayerName .., 298.2, -1156.8, 80.9, 90, 200 ) setCameraTarget( .. joinedPlayerName .. ) fadecamera( .. joinedPlayerName .., true ) end addEventHandler("OnPlayerJoin", getRootElement(), spawn) meta Link to comment
Gamesnert Posted April 13, 2009 Share Posted April 13, 2009 Why the '..' everywhere lol... Try removing those? Besides, it's onPlayerJoin, not OnPlayerJoin. Link to comment
heavy air Posted April 18, 2009 Share Posted April 18, 2009 function spawnThePlayer ( player ) local b = spawnPlayer ( player, -711+math.random(1,5), 957+math.random(5,9), 12.4, 90, math.random(9,288) ) if not b then spawnThePlayer ( player ) return end fadeCamera(player,true) end i think this might be what u need its from the BROPH resource just change coordinates in local b to where u want player to spawn you will need to call the function with onPlayerJoin the random numbers are so people dont spawn in a big tower i think Link to comment
Brophy Posted April 18, 2009 Share Posted April 18, 2009 the randoms numbers are so that people dont spawn inside each other Link to comment
lexagav[RUS] Posted May 24, 2009 Author Share Posted May 24, 2009 And what with my problem? Link to comment
Gamesnert Posted May 24, 2009 Share Posted May 24, 2009 Why the '..' everywhere lol... Try removing those?Besides, it's onPlayerJoin, not OnPlayerJoin. Link to comment
lexagav[RUS] Posted May 24, 2009 Author Share Posted May 24, 2009 function spawnThePlayer ( player ) local b = spawnPlayer ( player, -711+math.random(1,5), 957+math.random(5,9), 12.4, 90, math.random(9,288) ) if not b then spawnThePlayer ( player ) return end fadeCamera(player,true) end i think this might be what u need its from the BROPH resource just change coordinates in local b to where u want player to spawn you will need to call the function with onPlayerJoin the random numbers are so people dont spawn in a big tower i think This doesnt work((( May be i do something wrong but i dont know what Link to comment
Recommended Posts