23.12.2017, 22:57
Quote:
Opa maninho, nгo deu nenhum erro, porem agora quem tem cargo no servidor ao digitar a mensagem simplesmente nгo aparece no chat, apenas com quem ta com cargo no servidor.
|
PHP Code:
if(aInfo[playerid][Ajudante] == 1)
{
new Float: Coords[3], Nick[24], Str[256];
GetPlayerPos(playerid, Coords[0], Coords[1], Coords[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] [{FFFF00}Ajudante{FFFFFF}]{FFFFFF} %s", Nick, playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Coords[0], Coords[1], Coords[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}
if(aInfo[playerid][Moderador] == 1)
{
new Float: Coords[3], Nick[24], Str[256];
GetPlayerPos(playerid, Coords[0], Coords[1], Coords[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] [{FF8C00}Mod{FFFFFF}]{FFFFFF} %s", Nick, playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Coords[0], Coords[1], Coords[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}
if(aInfo[playerid][Admin] == 1)
{
new Float: Coords[3], Nick[24], Str[256], Str[256];
GetPlayerPos(playerid, Coords[0], Coords[1], Coords[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] [{00FF40}Admin{FFFFFF}]{FFFFFF} %s", Nick, playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Coords[0], Coords[1], Coords[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}
if(aInfo[playerid][Subdono] == 1)
{
new Float: Coords[3], Nick[24], Str[256];
GetPlayerPos(playerid, Coords[0], Coords[1], Coords[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] [{AA00F2}Sub-Dono{FFFFFF}]{FFFFFF} %s", Nick, playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Coords[0], Coords[1], Coords[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}
if(aInfo[playerid][AdminL] == 1)
{
new Float: Coords[3], Nick[24], Str[256];
GetPlayerPos(playerid, Coords[0], Coords[1], Coords[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] [{32CD32}Staff{FFFFFF}]{FFFFFF} %s", Nick, playerid, text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Coords[0], Coords[1], Coords[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}
if(BMO_GetInt(afile,"VIP") == 1)
{
new Float: Pos[3], Nick[24], Str[256];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
GetPlayerName(playerid, Nick, sizeof(Nick));
format(Str, sizeof(Str), "%s{FFFFFF}:[%d] {00FF00}[{FF0000}VIP{00FF00}]{00FFFF} %s",pname,playerid,text);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerInRangeOfPoint(i, 20.0, Pos[0], Pos[1], Pos[2]))
{
SendClientMessage(i, GetPlayerColor(playerid), Str);
}
}
return 0;
}