Jump to content

Pickup de skin bugado


Recommended Posts

Um pickup que era para dar uma skin está dando outra.

cvskin = createPickup ( 354.128, 46.554, 10.281, 3, 1275, 1000 )
function cvskin ( thePlayer )
  setPedSkin ( thePlayer, 28)
end
addEventHandler ( "onPickupUse", root, cvskin )

eu acho q ele está dando conflito com esse outro pickup:

pmerjskin = createPickup ( 1886.230, -1643.336, 13.468, 3, 1275, 1000 )
function pmerjskin ( thePlayer )
  setPedSkin ( thePlayer, 286 )
end
addEventHandler ( "onPickupUse", root, pmerjskin )
obs: esses scripts ficam e pastas de mapas diferentes.

help me.. prease 

 

Link to comment
  • 2 weeks later...

local cvskin = createPickup ( 354.128, 46.554, 10.281, 3, 1275, 1000 )
function setSkinOnPickupUse ( thePlayer )
	if source == cvskin and isPlayerInACL(thePlayer, "nome_acl") then
		setElementModel ( thePlayer, 28)
	end
end
addEventHandler ( "onPickupUse", resourceRoot, setSkinOnPickupUse )

function isPlayerInACL(player, acl)
	if isElement(player) and getElementType(player) == "player" and aclGetGroup(acl or "") and not isGuestAccount(getPlayerAccount(player)) then
		local account = getPlayerAccount(player)
		
		return isObjectInACLGroup( "user.".. getAccountName(account), aclGetGroup(acl) )
	end
	return false
end

 

  • Thanks 1
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...