Souzza06 Posted May 10, 2020 Share Posted May 10, 2020 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
Herc Posted May 11, 2020 Share Posted May 11, 2020 Amigo, use a função Code, assim é mais fácil de alguém te responder. Link to comment
Blaack Posted May 11, 2020 Share Posted May 11, 2020 (edited) 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 May 11, 2020 by Sr Black 1 Link to comment
Souzza06 Posted May 26, 2020 Author Share Posted May 26, 2020 On 11/05/2020 at 11:00, ~#BlackSCR said: OBRIGADO! Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now