I finally decided to try my hand at Pawn, but I'm having a little trouble.
Code:
public sayNextMap()
{
new name[32]
getNextMapName(name, 31)
new timeleft
timeleft = get_timeleft()
new minsuntilvote
minsuntilvote = timeleft / 60 - 2
if (timeleft < 65)
{
client_print(0, print_chat, "%L %s", LANG_PLAYER, "NEXT_MAP", name)
} else {
client_print(0, print_chat, "[AMX] There will be a vote in approximately %i minutes to choose the next map or extend the current one.", minsuntilvote)
}
}
I haven't tested the 'minsuntilvote' feature, so I'm not entirely sure if the syntax is correct, but when I type nextmap after the map vote (i.e. when there's less than 65 seconds remaining) the if statement returns false, meaning the wrong client_print is displayed. Where have I gone wrong?
Thanks for your time.