29.12.2016, 12:50
Esses dois comandos nгo estгo funcionando, eu digito "/h Teste" e nгo aparece nada, o mesmo ocorre com /ah, agradeзo a quem ajuda.
PHP код:
CMD:h(playerid, result[])
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: (/h ou /hc)helper [helper chat]");
return true;
}
if (PlayerInfo[playerid][pHelper] >= 1)
{
new string[128];
format(string, sizeof(string), "*%d Helper %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
SendHelperMessage(COR_HELPER, string);
PLLogs("helperchat", string);
printf("Helper %s: %s", sendername, result);
}
return true;
}
CMD:ah(playerid, result[])
{
GetPlayerName(playerid, sendername, sizeof(sendername));
if(isnull(result))
{
return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/ah)dmin/helper [admin/helper chat]");
}
new string[128];
if(PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
ChatHelperAdmin(COLOR_YELLOW2,string);
PLLogs("AdminHelperChat", string);
}
else if(PlayerInfo[playerid][pHelper] >= 1)
{
format(string, sizeof(string)," *%d Helper %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
ChatHelperAdmin(COLOR_YELLOW2, string);
PLLogs("AdminHelperChat", string);
}
return 1;
}
public SendHelperMessage(COLOR, striing[])
{
for(new i=1; i != MAX_ADMINS; i++)
{
if(PlayerInfo[i][pHelper] >= 1)
{
SendClientMessage(i, COLOR, striing);
}
}
return 1;
}
public ChatHelperAdmin(COLOR,const striing[])
{
for(new i=1; i != MAX_ADMINS; i++)
{
if(PlayerInfo[i][pHelper] >= 1 || PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, COLOR, striing);
printf("%s", striing);
}
}
return 1;
}