dcmd_o > dcmd_( ??
#10

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;
}
It didn't work... All that showed up was:

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;
    }
Reply


Messages In This Thread
dcmd_o > dcmd_( ?? - by introzen - 20.08.2009, 13:54
Re: dcmd_o > dcmd_( ?? - by MenaceX^ - 20.08.2009, 13:55
Re: dcmd_o > dcmd_( ?? - by introzen - 20.08.2009, 13:56
Re: dcmd_o > dcmd_( ?? - by MenaceX^ - 20.08.2009, 13:57
Re: dcmd_o > dcmd_( ?? - by introzen - 20.08.2009, 14:10
Re: dcmd_o > dcmd_( ?? - by MenaceX^ - 20.08.2009, 14:27
Re: dcmd_o > dcmd_( ?? - by Hiitch - 20.08.2009, 15:14
Re: dcmd_o > dcmd_( ?? - by kaisersouse - 20.08.2009, 15:16
Re: dcmd_o > dcmd_( ?? - by MenaceX^ - 20.08.2009, 15:26
Re: dcmd_o > dcmd_( ?? - by introzen - 20.08.2009, 19:26

Forum Jump:


Users browsing this thread: 1 Guest(s)