20.08.2009, 19:26
Quote:
Originally Posted by kaisersouse
OnPlayerText, if text[0] == '(' and !text[1] then fire off your command but return 0 at the end so the ( doesnt show up in chat.
Код:
if(text[0] == '(' && !text[1]) { new pName[MAX_PLAYER_NAME],string[256]; GetPlayerName(playerid,pName,sizeof(pName)); format(string,sizeof(string),"((%s: %s))",pName,params[0]); if(OOCChat == 1) { SendClientMessageToAll(0xD0F3D4AA,string); } else if(OOCChat == 0) return SendClientMessage(playerid,COLOR_DARKRED,"OOC CHAT DISABLED"); return 0; } |
Kjang_Munjitsu: ( (text)
Current code:
pawn Код:
if(text[0] == '(' && !text[1])
{
if(PlayerInfo[playerid][pShowName] == 0)
{
format(string,sizeof(string),"%s:(( %s ))",pName,text[0]);
ProxDetector(10.0,playerid,string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
else if(PlayerInfo[playerid][pShowName] == 1)
{
format(string,sizeof(string),"Unknown says:(( %s ))",text[0]);
ProxDetector(10.0,playerid,string,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE,COLOR_WHITE);
}
return 0;
}