pawn Код:
if(strcmp(cmd,"/r",true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new tmp[128];
strmid(tmp, cmdtext, 3, strlen(cmdtext));
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "/r [texto]");
return 1;
}
else
{
format(string, sizeof(string), "(Chat Cops) %s: %s", aname, tmp);
Chatp(GetPlayerColor(playerid), string, 1, playerid);
return 1;
}
}
forward Chatp(COLOR, const string[], level, playerid);
public Chatp(COLOR, const string[], level, playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(/*Variavel dos (parceiros)*/ == /*Variavel dos (parceiros)*/)
{
SendClientMessage(i, COLOR, string);
}
}
}
return 1;
}
pawn Код:
if(strcmp(cmd,"/m",true)==0)
{
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
new tmp[128];
strmid(tmp, cmdtext, 3, strlen(cmdtext));
if(!strlen(tmp))
{
SendClientMessage(playerid, Vermelho, "/m [texto]");
return 1;
}
else
{
format(string, sizeof(string), "(Chat Motoqueiros) %s: %s", aname, tmp);
Chatp(GetPlayerColor(playerid), string, 1, playerid);
return 1;
}
}
forward Chatm(COLOR, const string[], level, playerid);
public Chatm(COLOR, const string[], level, playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(/*Variavel dos (parceiros)*/ == /*Variavel dos (parceiros)*/)
{
SendClientMessage(i, COLOR, string);
}
}
}
return 1;
}