Jump to content

quetion


darhal

Recommended Posts

Posted

this not what I want I know this function lol I need it vibile too all players and created client side

In short I want a marker created client side and visible too all

Posted

Depends, what event is the function attached to? For example if you create the marker outside the function, it will be seen by every single player.

Posted
  
for i, v in ipairs( getElementsByType( "player" ) ) do 
local marker = createMarker( ... ) 
end 
  

nerver tried, maybe works.

But if this doesn't work you could trigger for all players from serverside and then create marker clientside.

Posted (edited)
  
for i, v in ipairs( getElementsByType( "player" ) ) do 
local marker = createMarker( ... ) 
end 
  

nerver tried, maybe works.

But if this doesn't work you could trigger for all players from serverside and then create marker clientside.

lol ??? why he need to use this

Man use createMarker and it will be visible for all players

createMarker() 

Edited by Guest
Posted

Lad his question was:

How to make a marker made client sided visible to all ? :D thx
--serverside-- 
addEventHandler( "onResourceStart", resourceRoot, 
function() 
for i, v in ipairs( getElementsByType( "player" ) ) do 
triggerClientEvent( "onPlayerCreateMarker", v ); 
end 
end ) 
  
--clientside-- 
addEvent( "onPlayerCreateMarker", true ); 
addEventHandler( "onPlayerCreateMarker", getLocalPlayer(), 
local marker = createMarker( x, y, z, "cylinder", 1, 255, 255, 0, 255 ); 
-- now you can add the rest of functions to marker here 
end ) 

This will do the work!

Posted
any way the problem solved I triggerd the event to server side and then create the marker thx all

bro creating a marker server side , or client side it's the same it will be visible for all .

just it's depending on you how to create it.

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...