15.11.2015, 16:13
How could I get the following;
If I had a vehicle and wanted to find out if the miles were in calculation of 500
So for instance, my vehicle had 2499 miles, when it hit 2500 miles it would show a SendClientMessage how could I do it?
Like, for every 500 miles SendClientMessage happens?
I saw something on the SA-MP forums but can't find it again; but it looked something like this:
That's not exact I don't think, but if I could get some assistance it would be great.
PS: Don't tell me to do switch statements etc, as I want to be able to get it for EVERY 500 not just the ones I defined.
It's like, if the var can be divided by 500 with a whole number it will allow it, else it won't.
I don't know how to fully explain it lol, thanks in advance!
If I had a vehicle and wanted to find out if the miles were in calculation of 500
So for instance, my vehicle had 2499 miles, when it hit 2500 miles it would show a SendClientMessage how could I do it?
Like, for every 500 miles SendClientMessage happens?
I saw something on the SA-MP forums but can't find it again; but it looked something like this:
pawn Код:
stock Stock(var){
if(var % 500)return true;
else return false;
}
PS: Don't tell me to do switch statements etc, as I want to be able to get it for EVERY 500 not just the ones I defined.
It's like, if the var can be divided by 500 with a whole number it will allow it, else it won't.
I don't know how to fully explain it lol, thanks in advance!