Jump to content

Where problem?


Parazitas

Recommended Posts

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

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

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