Jump to content

Bugs


Recommended Posts

Posted
addEvent("onMapStarting", true) 
addEventHandler("onMapStarting", getRootElement(), 
    function() 
        for i,v in ipairs(getElementsByType('player')) do 
            setElementData(v, "Hunter", false) 
        end 
    end) 
  
  
  
function someoneReachedHunter(number, sort, model) 
for index, account in ipairs ( getAccounts (        ) ) do 
        if getAccountPlayer ( account ) then 
    if (model == 425) then 
        if (getElementData(source, "Hunter") == false ) then 
                    outputChatBox ( "#000000* #ffffff " ..getPlayerName(source).." Got hunter! $#11dd111000", getRootElement(), 255, 255, 255, true ) 
                    setAccountData( account,"Hunters",tonumber( getAccountData( account,"Hunters" ) or 0 )+1 ) 
                    setAccountData( account,"Cash",tonumber( getAccountData( account,"Cash" ) or 0 )+1000 ) 
                    setAccountData( account,"EXP",tonumber( getAccountData( account,"EXP" ) or 0 )+5 ) 
            setElementData(source,"Hunter",true) 
        end 
    end 
end 
end 
end 
addEvent("onPlayerPickUpRacePickup",true) 
addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter) 

I Got some bugs.. Lets say we are playing 2 in the server.

And if both gots hunters, data sets only to one player..

What's wrong ?

Posted

You should try doing some debugging yourself, changing stuff and watching what happens.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted
Oh my good. Yes i did.

/debugscript 3

..

....... Debugging doesnt mean actually just debugscript 3, it means testing out WHY it happens by editing the lines that do it.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

name the getAccount table, like accounts = getAccounts then use accounts.

Ingame Name: Arnold

If you need my help, contact me on Skype @bshr.ara

NOTE:DO NOT ASK ME FOR SCRIPTS, ASK ME FOR HELP

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