Jump to content

Como fazer um pickup para pegar uma roupa para o CJ


Recommended Posts

 

zombiehunterpickup55555 = createPickup ( -1637.6564941406,1411.2716064453,7.1875, 3, 1275, 1000 )
function zombiehunterskinpickup55555 ( theSource )
  getPedClothes ( source, "player_legs", "player_legs", 2 )
  setPlayerTeam ( thePlayer, teamzombie )
 setElementData ( thePlayer, "zombie", true  )  
end
addEventHandler ( "onPickupUse", zombiehunterpickup55555, zombiehunterskinpickup55555 )
addEventHandler ("onPickupUse", getRootElement(), 

function (playerWhoUses)
  if (source == zombiehunterpickup55555) then
    setPlayerNametagText (playerWhoUses, "" .. getPlayerName (playerWhoUses))
    setElementData (playerWhoUses, "job", "farm")
  end
end)

Link to comment
19 hours ago, Souzza06 said:

 

zombiehunterpickup55555 = createPickup ( -1637.6564941406,1411.2716064453,7.1875, 3, 1275, 1000 )
function zombiehunterskinpickup55555 ( theSource )
  getPedClothes ( source, "player_legs", "player_legs", 2 )
  setPlayerTeam ( thePlayer, teamzombie )
 setElementData ( thePlayer, "zombie", true  )  
end
addEventHandler ( "onPickupUse", zombiehunterpickup55555, zombiehunterskinpickup55555 )
addEventHandler ("onPickupUse", getRootElement(), 

function (playerWhoUses)
  if (source == zombiehunterpickup55555) then
    setPlayerNametagText (playerWhoUses, "" .. getPlayerName (playerWhoUses))
    setElementData (playerWhoUses, "job", "farm")
  end
end)

 

pickuproupacj = createPickup ( -1637.6564941406,1411.2716064453,7.1875, 3, 1275, 1000 ) -- Cria o Pickup.


function pegarroupa ( source )
  local skin = getElementModel(source) -- Verifica skin de source
  if skin == 0 then -- Verifica se a skin de source é igual a 0, se for executa:
  addPedClothes ( source, "field", "field", 0 ) -- Adiciona uma camisa em source (modifique a seu gosto...)
  setElementData ( source, "zombie", true  )  -- Seta o elemento (source) na data 'zombie' como true;
  setPlayerTeam ( source, teamzombie ) -- Seta o elemento source no team 'teamzombie'
  else  -- Se a skin de source não for igual a 0, executara:
  outputChatBox("Pegue a skin do CJ primeiro!", source) -- Aviso para o mesmo pegar a skin 0 primeiro.
  end
  end
addEventHandler ( "onPickupHit", pickuproupacj, pegarroupa )

 

Edited by Sr Black
  • Like 1
Link to comment
  • 3 weeks later...

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