Quote:
Originally Posted by cessil
there's quite a few pointless ones, like Math.Add
also there's functions that won't work like
pawn Код:
stock Math.RandomPlayer( ) // Correct { new pCount, val ; for(new i, g = GetMaxPlayers(); i < g; i++) { if(IsPlayerConnected(i)) pCount++; } val = random(pCount); return val; }
it could return a non connected player
also this will return -.99 to -.01 as a positive
pawn Код:
stock bool: Math.IsPositive( Float: num ) // Correct { if( num > -1 ) return true; return false; }
and Math.Highest(...) won't work if you use all negative numbers
and you use RandomEx in the script but it should be Math.RandomEx
that's all just by looking over it
|
Thanks for that, I completely forgot while I was writing this function however they should be fixed. I'm currently at my cousins house and he doesn't have SA-MP nor the compiler and dial-up lawl. I've fixed it in notepad but not 100% correct if it'll work.
Updated :P