Jump to content

Who can help me with my script??????


Recommended Posts

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

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

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

I do this script with your events but he doest work! Veiv my script and configure it if you can! :P

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

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
  • 1 month later...
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...