Parazitas Posted February 2, 2016 Share Posted February 2, 2016 Hello guys i wanna replace marker but it's not work. Where is the problem? markers id's: 1316 - loop 1317- cylinder 1318 - arrow 1559 - cone addEventHandler('onClientResourceStart', resourceRoot, function() local txdingame = engineLoadTXD('ingame.txd',true) engineImportTXD(txdingame, 1317) localdffcylinder = engineLoadDFF('cylinder.dff', 1317) engineReplaceModel(dffcylinder, 1317) end ) Link to comment
Bonus Posted February 2, 2016 Share Posted February 2, 2016 I think these functions don't support marker. Only vehicles, skins, objects and weapons Link to comment
Parazitas Posted February 3, 2016 Author Share Posted February 3, 2016 But wtf.. I saw replaced marker mods in some servers.. Link to comment
Sir.BEEF Posted February 3, 2016 Share Posted February 3, 2016 Use this: -- this function is called whenever someone types 'createmarker' in the console: function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) -- get the player's position -- create a cylindrical marker next to the player: local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then -- check if the marker was created successfully outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) Link to comment
tosfera Posted February 3, 2016 Share Posted February 3, 2016 Use this: -- this function is called whenever someone types 'createmarker' in the console: function consoleCreateMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) -- get the player's position -- create a cylindrical marker next to the player: local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then -- check if the marker was created successfully outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", consoleCreateMarker ) Are you just acting/pretending stupid or are you seriously stupid..? He's trying to replace the TXD of a marker.. not create a marker with a command. @OP; can you try to see what the functions are returning? Simply use outputChatBox with tostring to see what the returned values of the functions are. They might not be able to be replaced, some people could use filters to add some GFX. But then again, it's just a normal object. If this doesn't work, you can always try to replace a simple object which will be used no where else, and spawn that on the same location of the marker. As another test, try the replacement of a simple dustbin ( 1337 ) and spawn that on your location after replacing the TXD. If that works but the marker replacement doesn't work, you'll know that you can't replace markers and that you should replace another model, disable the collision and spawn it at the same location as your marker. Don't forget to make your marker's own opacity 0. Link to comment
ViRuZGamiing Posted February 3, 2016 Share Posted February 3, 2016 I've tried this too a while ago because of his previous post and I tried to get an ID of a created marker and didn't work so they might not have one. what I didn't test tho is saving a marker in a map file and see what the parameters are. Link to comment
Parazitas Posted February 3, 2016 Author Share Posted February 3, 2016 Im try to replace and search info in other websites but nothing works.. im tired of this s**t Link to comment
ViRuZGamiing Posted February 3, 2016 Share Posted February 3, 2016 Im try to replace and search info in other websites but nothing works.. im tired of this s**t Try using a bin and change that model to the marker then attach the bin to the marker and set the marker's alpha to 0. Link to comment
Parazitas Posted February 4, 2016 Author Share Posted February 4, 2016 Bin? umm... i tried replace other object to this mod and place object to marker places and set markers alpha to 0 but.. its same.. or maybe i use bad script.. 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