- เครดิต
- 31
- ความรู้
-
- เงิน $
-
- ความดี
-
|
asdasdasdif(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, " คุณยังไม่ได้ล็อกอิน !");
return 1;
}
if ((noooc) && PlayerInfo[playerid][pAdminLevel] < 3)
{
SendClientMessage(playerid, 0x33CCFFAA, " ระบบ OOC ถูกปิดโดย Admin !");
return 1;
}
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, 0x33CCFFAA, " คุณไม่สามารถพูดคุยได้ เพราะคุณเป็นไบ้ !");
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, "Usage: (/o)oc [ooc chat]");
return 1;
}
for(new word=0; word < sizeof(BadWords); word++)
{
DisableWord(BadWords[word][0], result);
}
if(strfind(result,"1",true)!= -1 && strfind(result,"2",true)!= -1 && strfind(result,"2",true)!= -1 && strfind(result,".",true)!= -1
&& strfind(result,"1",true)!= -1 && strfind(result,"5",true)!= -1
|| strfind(result,"2",true)!= -1 && strfind(result,"0",true)!= -1 && strfind(result,"3",true)!= -1 && strfind(result,".",true)!= -1
&& strfind(result,"1",true)!= -1 && strfind(result,"4",true)!= -1
|| strfind(result,"2",true)!= -1 && strfind(result,"0",true)!= -1 && strfind(result,"2",true)!= -1 && strfind(result,".",true)!= -1
&& strfind(result,"1",true)!= -1 && strfind(result,"7",true)!= -1
|| strfind(result,"2",true)!= -1 && strfind(result,"1",true)!= -1 && strfind(result,"0",true)!= -1 && strfind(result,".",true)!= -1
&& strfind(result,"1",true)!= -1)
{
SendClientMessage(playerid,COLOR_GRAD1," จะพูดว่าไรอะ !");
return 1;
}
if(SpamStrings[playerid] >= MAX_SPAM)
{
SendClientMessage(playerid,COLOR_GRAD1," อย่าฟลั๊ดครับ !");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 2)
{
SpamStrings[playerid] += 3;
format(string, sizeof(string), "[[ OOC NewPlayer ]] %s(%d): %s ]]", sendername, playerid, result);
OOCOff(0xFF830000,string);
}
else if(PlayerInfo[playerid][pDonateRank] > 0)
{
SpamStrings[playerid] += 3;
format(string, sizeof(string), "[[ OOC Vip Account ]] %s(%d): %s ]]", sendername, playerid, result);
OOCOff(COLOR_YELLOW2,string);
}
else
{
SpamStrings[playerid] += 3;
format(string, sizeof(string), "[[ OOC Standard ]] %s(%d): %s ]]", sendername, playerid, result);
OOCOff(COLOR_OOC,string);
}
printf("%s", string);
}
return 1;
} |
|