Jump to content

Problems


Jaysds1

Recommended Posts

BUT IN THE THE WIKI, IT DOESN'T SHOW THE INTERIOR

  
marker createMarker ( float x, float y, float z, [string theType, float size, int r, int g, int b, int a, visibleTo = getRootElement()] ) 

Required Arguments

x: A floating point number representing the X coordinate on the map.

y: A floating point number representing the Y coordinate on the map.

z: A floating point number representing the Z coordinate on the map.

Optional arguments

NOTE: When using optional arguments, you must supply all arguments before the one you wish to use. For more information on optional arguments, see Optional Arguments.

theType: The visual type of the marker to be created. Possible values:

"checkpoint": A race checkpoint. These are very tall, but not infinite, light pillars. Checkpoints snap to ground and become invisible after going over a certain Z height.

"ring": Doughnut shaped ring, normally used for aircraft.

"cylinder": Small glowing ground ring. These are the glow markers you walk into to activate missions or events in single player.

"arrow": Arrow pointing down. These are the arrows on the doors you can enter in single player, except MTA's are not animated by default.

"corona": A glowing ball of light.

size: The diameter of the marker to be created, in meters.

r: An integer number representing the amount of red to use in the colouring of the marker (0 - 255).

g: An integer number representing the amount of green to use in the colouring of the marker (0 - 255).

b: An integer number representing the amount of blue to use in the colouring of the marker (0 - 255).

a: An integer number representing the amount of alpha to use in the colouring of the marker (0 - 255 where 0 is transparent and 255 is opaque).

visibleTo: Every element that is a child of this element can see the marker. See visibility.

Link to comment
  • Replies 365
  • Created
  • Last Reply

Top Posters In This Topic

Fine sorry,

Does anyone know why when I login, the screen is blank?

Here is my script:

Client

  
function DONE() 
            -- hide the gui, hide the cursor and return control to the player 
            guiSetVisible(GUIEditor_Window[2], false) 
            guiSetVisible(GUIEditor_Window[1], false) 
            guiSetVisible(back_Ground, false) 
            showCursor(false) 
            guiSetInputEnabled(false) 
            triggerServerEvent ( "onPlayer", getRootelement()) 
end 
addEvent("Done",true) 
addEventHandler("Done", getRootElement(), DONE) 
  

Server

  
  
function finish() 
    spawnPlayer (source, x, y, z, 0, math.random (1,288), 0, 0, teamF) -- spawns player with random skin 
    fadeCamera(source, true) 
    setCameraTarget(source, source) 
end 
addEvent ( "onPlayer",true) 
addEventHandler ( "onPlayer", getRootElement(), finish) 
  

Edited by Guest
Link to comment

in finish function source are not defined so tis nothing

change source to client

  
function finish() 
spawnPlayer (client, x, y, z, 0, math.random (1,288), 0, 0, teamF) -- spawns player with random skin 
fadeCamera(client, true) 
setCameraTarget(client, source) 
end 
addEvent ( "onPlayer",true) 
addEventHandler ( "onPlayer", getRootElement(), finish) 
  

EDIT: @will briggs: fadeCamera false will make it fade to black , true will fade in

EDIT2: use [.lua] [./lua] and remove the dots :D

Edited by Guest
Link to comment

i dont get what u want

do u want to retrieve a text from a gui and set the player name to it?

  
local text = guiGetText(thegui) 
triggerServerEvent('ChangePlayerName', getRootElement(), text) 
-- you add the event serverside 
setPlayerName(client, text) 
  

need more help?

Link to comment

1- i said its not the full code so it wont work ..

2- thats why we got triggerServerEvent and triggerClientEvent

  
-- client side 
-- theGUI is the gui element u want to retrive its text replace it 
local text = guiGetText(theGUI) 
if text ~= '' then 
     triggerServerEvent('ChangePlayerName', getRootElement(), text) -- click on the function for more details about it 
end 
  
--server side 
addEvent('ChangePlayerName', true) 
addEventHandler('ChangePlayerName', root, 
     function(text) 
            setPlayerName(client, text) 
     end 
) 
  

the script just shows u how to "get the text if it's client-side and the setPlayerName is Sever-side"

dont copy and paste it cuz it wont work u must edit it

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...