13.07.2016, 15:59
Are you using sscanf in your script?
If you are, use this:
And then use weaponid instead of strval(inputtext).
Also, you shouldn't use functions that much in an if statement. Use switch instead:
If you aren't using sscanf, search for a function called "IsNumeric" to check if it's an actual number.
If you are, use this:
Код:
new weaponid; if (sscanf(inputtext, "i", weaponid)) return // Inputtext is not a number
Also, you shouldn't use functions that much in an if statement. Use switch instead:
Код:
switch (weaponid) { case 0..5: // If weaponid = 0 or 1 or 2 to 5 { } }