help - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: help (
/showthread.php?tid=241879)
help -
armyoftwo - 18.03.2011
pawn Код:
vSpeed = vSpeed * 1.4;
printf("Speed:%0.0f", vSpeed);
switch(vSpeed)
{
case 0..50:
{
format(km_str, 22, "~w~%0.0fkm/h", vSpeed);
}
case 51..300:
{
format(km_str, 22, "~r~%0.0fkm/h", vSpeed);
}
}
printf("Veh speed: %s", km_str);
vSpeed value is 35(float), but it doesnt format?
What's wrong?
Re: help -
Vince - 18.03.2011
If I'm not mistaken, you can only use integer values in a switch.