Jump to content

[Help]Scripting HitMarker Clothes


ShaunaV

Recommended Posts

function cambio(thePlayer, matchingDimension) 
    if isElementWithinMarker (thePlayer, MarkerAmarilo, matchingDimension) then  
         addPedClothes ( thePlayer, "tshirt2horiz", "tshirt2", 3 ) 
        else 
            outputChatBox ("No se pudo poner la ropa", thePlayer, 255, 0, 0) 
    end 
end 
  
  
addEventHandler("onPlayerMarkerHit",getRootElement(),cambio) 
  
function MarkerAmarilo() 
  
marker = createMarker (-2522.07715, -657.68250, 146.90631,"cylinder",1.0,250,220,0,250, getRootElement() ) 
end 
  
  
addEventHandler ( "onResourceStart", getRootElement(), MarkerAmarilo ) 
  
  

I create this script but dont work, who can help me :?:

The script is for when a player touches the marker , change clothes.

Thanks :D

Link to comment
  
  
marker = createMarker (-2522.07715, -657.68250, 146.90631,"cylinder",1.0,250,220,0,250, getRootElement() ) 
  
  
function cambio(thePlayer, matchingDimension) 
    if isElementWithinMarker (thePlayer, MarkerAmarilo, matchingDimension) then  
         addPedClothes ( thePlayer, "tshirt2horiz", "tshirt2", 3 ) 
        else 
            outputChatBox ("No se pudo poner la ropa", thePlayer, 255, 0, 0) 
    end 
end 
  
  
addEventHandler("onPlayerMarkerHit",getRootElement(),cambio) 

It doesn´t work

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