darhal Posted April 18, 2015 Share Posted April 18, 2015 How to make a marker made client sided visible to all ? thx Link to comment
darhal Posted April 18, 2015 Author Share Posted April 18, 2015 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 Link to comment
Dimos7 Posted April 18, 2015 Share Posted April 18, 2015 Marker alhpa its that make it visible or invisible to player 0 its invisible and 255 its visible Link to comment
darhal Posted April 18, 2015 Author Share Posted April 18, 2015 I know that too but is marker sync when it s created client sided ? Link to comment
Dimos7 Posted April 18, 2015 Share Posted April 18, 2015 When create the marker will be able all players see it that i know Link to comment
darhal Posted April 18, 2015 Author Share Posted April 18, 2015 when you create it server side or client side ? Link to comment
Dimos7 Posted April 18, 2015 Share Posted April 18, 2015 i think its same for both but not 100 precent Link to comment
darhal Posted April 18, 2015 Author Share Posted April 18, 2015 I will test edit: only show for one player Link to comment
pa3ck Posted April 21, 2015 Share Posted April 21, 2015 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. Link to comment
Maurize Posted April 21, 2015 Share Posted April 21, 2015 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. Link to comment
Walid Posted April 21, 2015 Share Posted April 21, 2015 (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 April 21, 2015 by Guest Link to comment
Maurize Posted April 21, 2015 Share Posted April 21, 2015 Lad his question was: How to make a marker made client sided visible to all ? 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! Link to comment
pa3ck Posted April 21, 2015 Share Posted April 21, 2015 You don't need serverside script at all... local marker = createMarker( 0, 0, 3, "cylinder", 5 ) Link to comment
darhal Posted April 25, 2015 Author Share Posted April 25, 2015 any way the problem solved I triggerd the event to server side and then create the marker thx all Link to comment
Walid Posted April 25, 2015 Share Posted April 25, 2015 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. Link to comment
darhal Posted April 25, 2015 Author Share Posted April 25, 2015 I m attaching this to onClientKey event and infact this a silly quetion that i will not ask it again Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now