12.12.2010, 12:45
Look my code:
If a player types the simbol & + message, the message will be sent according to these defined teams above. How to do that? it's not working :S. Also tried
pawn Код:
if(text[0] == '&')
{
new string[128],nome[30];
GetPlayerName(playerid, nome, 30);
format(string,sizeof(string),"%s [ID: %d]: %s", nome, playerid, text);
foreach(Player, todos)
{
if(IsPlayerConnected(todos))
{
if(time[todos] == EMPTY) return SendClientMessage(todos, 0xFFFFFFFF, string);
else if(time[todos] == POLICE) return SendClientMessage(todos, 0x0080FFFF, string);
else if(time[todos] == ARMY) return SendClientMessage(todos, 0x7CAD0CFF, string);
else if(time[todos] == RUNNER) return SendClientMessage(todos, 0xFF00FFFF, string);
else if(time[todos] == ADMIN) return SendClientMessage(todos, 0xFFFF80FF, string);
}
}
}
Код:
if(strfind(text,"&",true) =! -1)