Jump to content

Help with size of marker in game


Recommended Posts

  
-- Author: Stanley Sathler 
-- Date: 12/06/2011 
-- Function: set an uniform for the player 
  
  
marca_troca_roupa_1 = getElementByID("marca_troca_roupa_1") -- Get the marker in map file 
using_uniform = false 
  
function SetUniform(player, in_dimension) 
    if (using_uniform ~= true) then 
        addPedClothes(player, "vest", "vest", 0) -- Set the shirt 
        addPedClothes(player, "worktrcamogrn", "worktr", 2) -- Set the trouser 
        addPedClothes(player, "bask1problk", "bask1", 3) -- Set the shoes 
        addPedClothes(player, "beretblk", "beret", 16) -- Set the hat    
        using_uniform = true 
    end 
end 
addEventHandler("onMarkerHit", marca_troca_roupa_1, SetUniform) 
  

Hi again, guys.

I am noob in Lua, thats very hard to me. :\

Well... the function of my code is change an especified clothes when a player enter on a marker. Ok, is working. But the function is called before I enter on a marker (2 meters before, approximately).

I want call the function when I enter on the marker (size 1), and not before (near of the mark).

Thank you for attention,

Stanley Sathler.

Link to comment

Wafamde, there's not an output with errors in console if is it that you want. The code just doesn't work when I enter on marker. And I used 0.5.

----- EDIT -----

I tried use createMarker() and the code work now. Well, I'll use createMarker then. It will be more hard, but is the unique method, I guess.

Thank all, guys. :)

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