Need help with this
#1

Hi, in my server when I type "# hi" it says Admin lauder: hi but then when I try to chat regularly the text don't show up, help with this please.
Here's the code
Код:
public OnPlayerText(playerid, text[])
{
//Now les't make an admin chat, it will be:  # <text>.
	if( (text[0] == '#' || text[0] == '@') && strlen(text) > 1)
	{
		new str[128];
		new szPlayerName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, szPlayerName, MAX_PLAYER_NAME);

		if(IsPlayerAdmin(playerid))
		{
		    format(str, 128, "{FF0000}Admin %s: {DBED15}%s", szPlayerName, text[1]);

			for(new iPlayerID; iPlayerID < MAX_PLAYERS; iPlayerID++)
			{
				if(!IsPlayerConnected(iPlayerID)) continue;
		    	if(!IsPlayerAdmin(iPlayerID)) continue;
			    SendClientMessage(iPlayerID, 0xFFFFFFAA, str);
			}
		}

		return 0;
	}
}
--------------------------------------------
Also if any one has the commands /givehealth and /givearmor can you please give me a copy of that [Thanks Everyone]
Reply


Messages In This Thread
Need help with this - by RiChArD_A - 19.01.2013, 19:50
Re: Need help with this - by CodyCummings - 19.01.2013, 19:53
Re: Need help with this - by DeathOnaStick - 19.01.2013, 19:53
Respuesta: Re: Need help with this - by RiChArD_A - 19.01.2013, 20:33
Re: Respuesta: Re: Need help with this - by DeathOnaStick - 19.01.2013, 20:39
Respuesta: Re: Respuesta: Re: Need help with this - by RiChArD_A - 20.01.2013, 03:02
Re: Need help with this - by Jewell - 20.01.2013, 03:55
Re: Need help with this - by Threshold - 20.01.2013, 04:50
Respuesta: Re: Need help with this - by RiChArD_A - 20.01.2013, 19:52

Forum Jump:


Users browsing this thread: 2 Guest(s)