Jump to content

Skin system [Ajuda]


Recommended Posts

Boas a todos, eu estava a tentar criar um pequeno sistema de skin, como por exemplo, quando o jogador entra dentro do marker, ele troca de skin, mas não estou a conseguir cria-lo na perfeição, aqui esta o que eu tentei fazer:

(so para saberem eu tentei usar a wiki do MTA para realizar este script :) ) obrigado aos que tentarem ajudar.

local myMarker = createMarker( 2036.1735839844, -1413.0563964844, 16.9921875, 'cylinder',2.0, 255, 0, 0, 150) 
  
function MarkerHit( hitElement, matchingDimension ) 
   local elementType = getElementType( hitElement ) 
   setPlayerSkin(playerSource, 280) 
    outputChatBox("Militare", playerSource) 
  end 
 else 
    outputChatBox("Ja tens esta Skin!", thePlayer, 255, 0, 0) 
 end 
addEventHandler( "onMarkerHit", myMarker, MarkerHit 

Link to comment

tente fazer isso:

local myMarker = createMarker( 2036.1735839844, -1413.0563964844, 16.9921875, 'cylinder',2.0, 255, 0, 0, 150) 
  
function MarkerHit( hitElement, matchingDimension ) 
   local elementType = getElementType( hitElement ) 
   if(elementType == "player") then 
   local model = getElementModel(hitElement) 
if(model~=280)then 
  setElementModel(hitElement,280) 
    outputChatBox("Militare", hitElement) 
 else 
    outputChatBox("Ja tens esta Skin!", hitElement, 255, 0, 0) 
 end 
 end 
 end 
addEventHandler( "onMarkerHit", myMarker, MarkerHit) 

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