Jump to content

Abrir Gui con marker


angelberge

Recommended Posts

Server side:

-- Define the function that will handle the 'createmarker' command 
function consoleCreateMarker ( playerSource, commandName ) 
    -- If a player triggered it (rather than the admin) then 
    if ( playerSource ) 
        -- Get that player's position 
        x, y, z = getElementPosition ( playerSource ) 
        -- Create a marker at their position 
        createMarker ( x, y, z, 0, "checkpoint", 255, 0, 0, 255 )  
        -- Output it in the chat box 
        outputChatBox ( "You got a red marker", playerSource ) 
    end 
end 
-- Add the function as a handler for the command 
addCommandHandler ( "vallejo", consoleCreateMarker ) 

Pero solo error en el server side. Bad argument

Soy un poco nuevo en esto.

Link to comment

Prueba Así

  
  
function consoleCreateMarker ( playerSource, commandName ) 
    if ( playerSource ) then 
   
       local x, y, z = getElementPosition ( playerSource ) 
    
      local marker = createMarker ( x, y, z, 0, "checkpoint", 255, 0, 0, 255 ) 
    
        outputChatBox ( "You got a red marker", playerSource ) 
    end 
end 
addCommandHandler ( "vallejo", consoleCreateMarker ) 

Link to comment
  • Recently Browsing   0 members

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