Jump to content

preciso de ajuda pfv sou novo no mta e script


Recommended Posts

bom preciso colocar spawn de skin e permissão acl dentro desse script se puder me ajudar agradeço:

 

local equip = createPickup(-695.00061035156,960.53948974609,12.259748458862, 3, 1252, 1000)

function equipeplayer (player)
    giveWeapon(player, 31, 2000)
    setElementHealth (player, 100)
    setPedArmor (player, 100)
end
addEventHandler("onPickupHit", equip, equipeplayer)

 

<meta>
    <script src="PickupArmas.lua" type="server" />
</meta>
Edited by Lord Henry
Códigos convertidos de texto para Lua e XML.
Link to comment
On 06/12/2022 at 15:24, Thalles123 said:

bom preciso colocar spawn de skin e permissão acl dentro desse script se puder me ajudar agradeço:

 

local equip = createPickup(-695.00061035156,960.53948974609,12.259748458862, 3, 1252, 1000)

function equipeplayer (player)
    giveWeapon(player, 31, 2000)
    setElementHealth (player, 100)
    setPedArmor (player, 100)
end
addEventHandler("onPickupHit", equip, equipeplayer)

 

<meta>
    <script src="PickupArmas.lua" type="server" />
</meta>

Ola, 

local ADMIN_SKIN = 0 --admin skin id
addEventHandler("onPlayerSpawn", root,
    function()
       local playerAccount = getPlayerAccount(player) -- get player account
       local accountName
       if(not playerAccount) then return end -- if not exists account dont go further
       if(isGuestAccount(playerAccount)) then return end -- if account is guest account dont go further
       accountName = getAccountName(playerAccount) -- at the moment get account name  
       if(isObjectInACLGroup("user."..accountName, aclGetGroup("Admin"))) then -- if account on Admin Group Enter here
          setElementModel(source, ADMIN_SKIN) -- set player skin to admin
       end
    end
) 

 

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