Jump to content

Duals Script Help please


T-Raw/Tyga

Recommended Posts

Posted

Well,this is my Duals script i think that something is missing could help me?

function dubleuzi() 
    if getPlayerTeam(source) == "Desert Storm" then 
        setPedStat ( source, 75, 1000 ) 
    end 
end 
addEventHandler("onPlayerSpawn",getRootElement(),dubleuzi) 
  
function resetdubleuzi() 
if getPlayerTeam(source) == "Desert Storm" then 
        setPedStat ( source, 75, 500 ) 
    end 
end 
addEventHandler("onPlayerWasted",getRootElement(),resetdubleuzi) 

Posted

Use getTeamName( getPlayerTeam( source ) )

Why?

It is because getPlayerTeam returns the userdata of team and you are comparing userdata with string. Instead, get the team team name using getTeamName

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