how do i do percent in php? i have a mafia game and when someone kills someone i want the killer to get between 25 - 75 % of the user they kill's money EG/ If the user 'CuBz' was to kill the user 'Danny' then 'CuBz' should get between 25% - 75% of Danny's Money How would i do this? Cheers Cheers
why dont u use something along lines of $p1Money = winning player his money; $p2money = losing player 2 his money; $temp = rand(25, 75); $temp2 = $p2money/100; $moneytoadd = $temp2*$temp2; then just use function to round the numbers and then add $moneytoadd to $p1Money make any sense ?