SA-MP Forums Archive
Multiples of x - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Multiples of x (/showthread.php?tid=484591)



Multiples of x - DamonD - 31.12.2013

How would I do something like this?

If(PlayerInfo---bla bla bla = a multiple of 16...

Like if it was 16, 32, 48, etc... Is this possible?


Re: Multiples of x - Kyle - 31.12.2013

Код:
stock IsMultiple(number, multiple)
{
	if(number % multiple == 0) return true;
	else return false;
}
Example: if(IsMultiple(PlayerInfo[playerid][Number], 16) == true) { print("yay it's true"); }