Jump to content

[HELP] Private team pickups


RangeR..

Recommended Posts

Hi, I've tried hard to fix it but couldn't.

here's the code

team = createTeam ( "Crim", 255, 0, 0) 
pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) 
function pickupr() 
if getTeamName(getPlayerTeam(source)) == "Crim" then 
    local playerTeam = getPlayerTeam ( source ) 
      setElementHealth(source, 100) 
  else 
    return 
   end 
end 
addEventHandler("onPickupHit", getRootElement(), pickupr) 

Link to comment
team = createTeam ( "Crim", 255, 0, 0) 
pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) 
function pickupr(player) 
    if getTeamName(getPlayerTeam(player)) == "Crim" then 
        setElementHealth(player, 100) 
    else 
        cancelEvent(true) 
        return 
    end 
end 
addEventHandler("onPickupHit", getRootElement(), pickupr) 

Link to comment
team = createTeam ( "Crim", 255, 0, 0) 
pick = createPickup ( 2737.56470, -1760.36755, 44.14845, 3, 1240, 1 ) 
function pickupr(player) 
    if getTeamName(getPlayerTeam(player)) == "Crim" then 
        setElementHealth(player, 100) 
    else 
        cancelEvent(true) 
        return 
    end 
end 
addEventHandler("onPickupHit", getRootElement(), pickupr) 

Have you tried this?

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