Jump to content

Script Problem[HELP]


Price.

Recommended Posts

Posted

You are doing it vice-versa, instead of enabling god mode, you are disabling it, and instead of disabling, you are enabling it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

All you have to do is change "true" to "false" and "false" to "true" at setElementData.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

well i did that , then it tells me whenever i do /staff GodMode Disabled or Enabled when i do /staff again says same text

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

What do you mean?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

where i typed GodMode Enabled, if i made it true and the other false the other chatbox when it says GodMode Disabled will keep getting repeated, ex: /staff "GodMode Disabled", /staff "GodModeDisabled" , /staff "GodMode Disabled" doesnt say except 1 chatbox if i reversed it.

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

You mean that it's writing "enabled" and "disabled" at the same time?

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

uhm no keeps saying same text wether if it said 1Enabled , it will keep saying Enabled all the time i do /staff

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted
team = createTeam ( "Staff", 255, 255, 255 ) 
  
function teamSet ( thePlayer ) 
    local team = getTeamFromName ( "Staff" ) 
    local account = getPlayerAccount ( thePlayer ) 
    if ( not account or isGuestAccount ( account ) ) then 
        return 
    end 
  
    local accountName = getAccountName(account ) 
    if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "L5" ) ) ) then 
        if ( not getElementData ( thePlayer, "invincible" ) ) then 
            setElementData ( thePlayer, "invincible", true ) 
            setElementModel ( thePlayer, 217 ) 
            setPlayerTeam ( thePlayer, team ) 
            setPlayerNametagColor ( thePlayer, 255, 255, 255 ) 
            outputChatBox ( "#00FF00GodMode Enabled", thePlayer, 0, 255, 0, true ) 
        else 
            outputChatBox ( "#FF0000GodMode Disabled", thePlayer, 255, 0, 0, true ) 
            setElementData ( thePlayer, "invincible", false ) 
        end 
    end 
end 
addEvent ( "sTeame", true ) 
addEventHandler ( "sTeame", root, teamSet ) 
addCommandHandler ( "staff", teamSet ) 

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

this what gives me when i do /staff 07xp.png

PS: godmode or setteam not working nothing is working atm.

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

That means is never setting the element data back to "false", I don't see why shouldn't it do it.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

well let's forget about the chatbox, let's do when i do /staff it gets me to team and starts godmode normally

might this work? from 1st time.

team = createTeam ( "Staff", 255, 255, 255 ) 
  
function teamSet ( thePlayer ) 
    local team = getTeamFromName ( "Staff" ) 
    local account = getPlayerAccount ( thePlayer ) 
    if ( not account or isGuestAccount ( account ) ) then 
        return 
    end 
  
    local accountName = getAccountName(account ) 
    if ( isObjectInACLGroup ( "user.".. accountName, aclGetGroup ( "L5" ) ) ) then 
        if getElementData ( thePlayer, "invincible" ) then 
            setElementData ( thePlayer, "invincible", false) 
            setElementModel ( thePlayer, 217 ) 
            setPlayerTeam ( thePlayer, team ) 
            setPlayerNametagColor ( thePlayer, 255, 255, 255 ) 
        else 
            setElementData ( thePlayer, "invincible", true) 
        end 
    end 
end 
addEvent ( "sTeame", true ) 
addEventHandler ( "sTeame", root, teamSet ) 
addCommandHandler ( "staff", teamSet ) 

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

The chat box message ain't the problem.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Found the problem, copy my code again.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

i've tried something else worked without chatbox, but your code is so much better thanks!

YOU HAVE TO TRUST SOMEONE TO BE BETRAYED.I NEVER DID

Posted

You're welcome.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

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