17.01.2012, 15:33
Hello All,
I'm trying to do it so my /o(oc) when disabled admins can still use it..how could I?
The /o command is this
I'm trying to do it so my /o(oc) when disabled admins can still use it..how could I?
The /o command is this
pawn Код:
}
CMD:ooc(playerid, params[]) {
if(systemVariables[OOCStatus] == 1)
return SendClientMessage(playerid, COLOR_GREY, "The OOC chat channel is currently disabled.");
if(playerVariables[playerid][pOOCMuted] == 1)
return SendClientMessage(playerid, COLOR_GREY, "You have been muted from the OOC chat channel.");
if(!isnull(params)) {
new
playerName2[MAX_PLAYER_NAME];
GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);
format(szMessage, sizeof(szMessage), "(( %s says: %s ))", szPlayerName, params);
foreach(Player, x) {
if(playerVariables[x][pSeeOOC] == 1) {
GetPlayerName(x, playerName2, MAX_PLAYER_NAME);
if(strfind(szMessage, playerName2, true) == -1) {
format(szMessage, sizeof(szMessage), "(( %s says: %s ))", szPlayerName, params);
SendClientMessage(x, COLOR_LIGHT, szMessage);
} else {
if(strfind(playerName2, szPlayerName, true) != -1) {
format(szMessage, sizeof(szMessage), "(( %s says: %s ))", szPlayerName, params);
SendClientMessage(x, COLOR_LIGHT, szMessage);
} else {
format(szMessage, sizeof(szMessage), "(( %s says: "EMBED_LIGHTRED"%s "EMBED_OOC"))", szPlayerName, params);
SendClientMessage(x, COLOR_LIGHT, szMessage);
PlayerPlaySound(x, 1057, 0, 0, 0);
}
}
}
}