Resources

Results 1 to 1 of 1
  1. #1
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    Resources

    Hello,

    i am working on a script to trade resources in exchange for officer points but now i got following problem :
    it use decimal numbers like : 5772.79888904

    how could i just remove 5000 of the sources?

    i got this to get the resources;
    PHP Code:
    // Metal 
    $metal explode("."$infos2["metal"]); 

    // Crystal 
    $crystal explode("."$infos2["crystal"]); 
             
    // Deuterium 
    $deuterium explode("."$infos2["deuterium"]); 
             
    if(
    $metal[0] >= 5000 AND $crystal[0] >= 5000 AND $deuterium[0] >= 5000){ 
    echo 
    "Enough";     
    } else { 
    echo 
    "Not enough";     

    hope someone could help me out on this one!

    ~ Passie




Advertisement