 |
|
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
|

10-29-2013
, 10:24
Re: enable/disable chat command
|
#4
|
Quote:
Originally Posted by Debesėlis
How about message?
PHP Code:
msg[ id ] = msg[ id ] ? print_chat( id, "%L", LANG_SERVER, "INFO_ON" ) true : print_chat( id, "%L", LANG_SERVER, "INFO_OFF" ) false;
Is this will work?
PHP Code:
switch (msg[ id ] ) { case 0: { msg[ id ] = false; print_chat( id, "%L", LANG_SERVER, "INFO_OFF" ) } case 1: { msg[ id ] = true; print_chat( id, "%L", LANG_SERVER, "INFO_ON" ) } }
|
PHP Code:
msg[id] = msg[id] ? false : true;
---------->
PHP Code:
msg[id] = !msg[id];
&
PHP Code:
msg[ id ] = msg[ id ] ? print_chat( id, "%L", LANG_SERVER, "INFO_ON" ) true : print_chat( id, "%L", LANG_SERVER, "INFO_OFF" ) false;
--------->
PHP Code:
print_chat(id,"%L",id,(msg[id] ? "INFO_ON":"INFO_OFF"));
__________________
|
|
|
|