V1RU5 Posted August 3, 2019 Share Posted August 3, 2019 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
DNL291 Posted August 3, 2019 Share Posted August 3, 2019 local cvskin = createPickup ( 354.128, 46.554, 10.281, 3, 1275, 1000 ) function setSkinOnPickupUse ( thePlayer ) if source == cvskin then setElementModel ( thePlayer, 28) end end addEventHandler ( "onPickupUse", resourceRoot, setSkinOnPickupUse ) https://wiki.multitheftauto.com/wiki/Character_Skins Movido para Portuguese / Português > Programação em Lua @V1RU5 1 Link to comment
V1RU5 Posted August 12, 2019 Author Share Posted August 12, 2019 tem como botar para a pessoa pegar skin apenas se tiver na acl da corp? @DNL291 Link to comment
[M]ister Posted August 13, 2019 Share Posted August 13, 2019 Sim, através do isObjectInACLGroup Link to comment
DNL291 Posted August 13, 2019 Share Posted August 13, 2019 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 1 Link to comment
V1RU5 Posted August 13, 2019 Author Share Posted August 13, 2019 aonde eu coloco o nome da acl ??? foi mau sou leigo mesmo. @DNL291 Link to comment
Jonas^ Posted August 14, 2019 Share Posted August 14, 2019 Era só ter lido, onde esta escrito nome_acl na linha 4. 1 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