if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " Du bist nicht eingeloggt!");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdmin] < 1)
{
SendClientMessage(playerid, COLOR_GRAD2, " Der /ooc Chat wurde von einem Administrator ausgeschaltet!");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht schreiben, du bist gemutet!");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, " (/o)oc [ooc chat]");
return 1;
}
if(Adminmode[playerid] == 0)
{
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
GivePlayerMoney(playerid, -20);
GameTextForPlayer(playerid, "~y~Der Massenchat kostet~n~~y~dich~r~-20$",4000,1);
OOCOff(COLOR_OOC,string);
}
else if (Adminmode[playerid] == 1)
{
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
OOCOff(COLOR_RED,string);
}
if(PlayerInfo[playerid][pLevel] < 1)
{
SendClientMessage(playerid, COLOR_GRAD5, "Du bist noch nicht eingeloggt");
return 1;
}
if(GetPlayerMoney(playerid) < 22)
{
SendClientMessage(playerid, COLOR_GRAD5, "Du hast nicht genug Geld");
return 1;
}
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
printf("%s", string);
}
return 1;
}