Jump to content

PickUp para un solo team


Tomas

Recommended Posts

local pickup = createPickup ( 0, 0, 5, 1,100) 
  
function isPlayerInTeam( thePlayer, teamName ) 
    local pTeam = getPlayerTeam( thePlayer ) 
    local fTeam = getTeamFromName( teamName ) 
    if ( pTeam ) and ( fTeam ) then 
        if ( pTeam == fTeam ) then 
            return true  
        end 
    end 
end 
  
function pickupUse ( thePlayer ) 
    if source == pickup then 
        if isPlayerInTeam (thePlayer, "TeamName") then 
            setPedArmor(thePlayer, 100) 
        else 
            cancelEvent() 
        end 
    end  
end 
addEventHandler ( "onPickupUse", getRootElement(), pickupUse ) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...