// OOC if(!strcmp(cmdtext, "/ooc", true,4)){ if(!strlen(cmdtext[4])) SendClientMessage(playerid, 0xffffffff, "USAGE: /ooc [text]"); else { new tmp[192]; GetPlayerName(playerid,tmp,24); format(tmp,192,"((OOC - %s: %s))",tmp,cmdtext[5]); SendClientMessageToAll(0xFFFFFFAA,tmp); print(tmp); } return 1; }
new bool:OOCenable = true;
if(!OOCenable) return SendClientMessage(playerid, 0xffffffff, "ERROR: OOC disabled by Admin.");
OOCenable = true; //Will enable OOC.
OOCenable = false; //Will turn off OOC.
if(!strcmp(cmdtext, "/toggleooc", true,10))
{
if(!IsPlayerAdmin(playerid))//or whatever your admin variable is
{
SendClientMessage(playerid, 0xFFFFFFFF, "You are not an admin");
return 1;
}
if(ToggleOOC == 1)
{
ToggleOOC = 0;
SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been disabled");
}
else
{
ToggleOOC = 1;
SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been enabled");
}
return 1;
}
if(!strcmp(cmdtext, "/ooc", true,4)){
if(ToggleOOC == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "Global OOC chat has been disabled");
return 1;
}
if(!strlen(cmdtext[4])) SendClientMessage(playerid, 0xffffffff, "USAGE: /ooc [text]");
else {
new tmp[192];
GetPlayerName(playerid,tmp,24);
format(tmp,192,"((OOC - %s: %s))",tmp,cmdtext[5]);
SendClientMessageToAll(0xFFFFFFAA,tmp);
print(tmp);
}
return 1;
}
D:\Compton City Roleplay\gamemodes\CPT.pwn(1155) : error 035: argument type mismatch (argument 2) D:\Compton City Roleplay\gamemodes\CPT.pwn(1160) : error 035: argument type mismatch (argument 2) Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 2 Errors.
ToggleOOC = 0; SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been disabled"); } else { ToggleOOC = 1; SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been enabled");
Take off the "playerid". If the SendClientMessage is to all, why would it require a playerid? LOL.
|
SendClientMessageToAll(playerid, 0xFFFFFFFF, "Global OOC chat has been enabled");
Take off the "playerid". If the SendClientMessage is to all, why would it require a playerid? LOL.
|