13.03.2015, 16:32
PHP код:
COMMAND:ooc(playerid)
{
if(oocenable) SendClientInfo(playerid, "OOC is on!");
new tmp[4];
if(sscanf(params, "s", tmp)) return SCP(playerid, "[on/off]");
if(strcmp(tmp,"on",true)==0)
{
oocenable=1;
SendClientMessageToAll(COLOR_GREENYELLOW,"[SERVER] OOC Chat enabled");
format(iStr, sizeof(iStr), "3..: Global OOC enabled by %s :..", PlayerName(playerid));
iEcho(iStr);
}
else if(strcmp(tmp,"off",true)==0)
{
oocenable=0;
SendClientMessageToAll(COLOR_GREENYELLOW,"[SERVER] OOC Chat disabled");
format(iStr, sizeof(iStr), "3..: Global OOC disabled by %s :..", PlayerName(playerid));
iEcho(iStr);
}
else return SCP(playerid, "[on/off]");
return 1;
}