- Joined
- Jan 14, 2005
- Messages
- 395
- Reaction score
- 2
Hello,
i am working on a script to trade in officer points but now i got following problem :
it use decimal numbers like : 5772.79888904
and the resource is 1772 but how i can just remove 5000 of the number ?
on the check i use xplode by "." like :
Thanks,
Passie.
i am working on a script to trade in officer points but now i got following problem :
it use decimal numbers like : 5772.79888904
and the resource is 1772 but how i can just remove 5000 of the number ?
on the check i use xplode by "." like :
PHP:
// 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";
}
Thanks,
Passie.

