Hello. Right now I have this dumb code:
PHP Code:
switch(i_state)
{
case 0:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_0")
}
case 1:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_1")
}
case 2:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_2")
}
case 3:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_3")
}
case 4:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_4")
}
case 5:
{
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_5")
}
}
How I can simplify it? I try:
PHP Code:
new state_str[32]
num_to_str(i_state, state_str, charsmax(state_str))
client_print(id, print_chat, "%s%L", PREFIX, LANG_SERVER, "S_%s", state_str)
But I got:
(ofcousre "S_0" exist in language file of plugin)