24.01.2020, 21:25
A non-emit alternative:
Note that this (obviously) will not work this way:
As it's a macro/define, this would be translated to "return do{format...".
Also if you just use parameters playerid, color, message it this ..Ex function would fail as it wouldn't be recognised by the pre-processor.
Also you may have noticed the "stock bool:FALSE = false". The do statement must run once (hence the while(false)). Using "false" you'd get an error (empty statement I believe, indu---something--- code). By defining stock FALSE you still use the same statement except the compiler doesn't recognise it as an empty statement. So in short, just a way to make the compiler happy)
Even though it doesn't matter that much with systems these days, this is better for runtime speeds. Just go with whatever you desire, this is just what I prefer.
Code:
stock bool:FALSE = false; new scmExStr[144]; #define SendClientMessageEx(%0,%1,%2,%3) do{format(scmExStr,144,%2,%3);SendClientMessage(%0,%1,scmExStr);}while(FALSE)
Code:
if (!statement) return SendClientMessageEx...
Also if you just use parameters playerid, color, message it this ..Ex function would fail as it wouldn't be recognised by the pre-processor.
Also you may have noticed the "stock bool:FALSE = false". The do statement must run once (hence the while(false)). Using "false" you'd get an error (empty statement I believe, indu---something--- code). By defining stock FALSE you still use the same statement except the compiler doesn't recognise it as an empty statement. So in short, just a way to make the compiler happy)
Even though it doesn't matter that much with systems these days, this is better for runtime speeds. Just go with whatever you desire, this is just what I prefer.