Portal SAMP
CHAT GLOBAL ADM - Versão de Impressão

+- Portal SAMP (https://portalsamp.com)
+-- Fórum: SA-MP (https://portalsamp.com/forumdisplay.php?fid=5)
+--- Fórum: Área de suporte (https://portalsamp.com/forumdisplay.php?fid=6)
+--- Tópico: CHAT GLOBAL ADM (/showthread.php?tid=543)



CHAT GLOBAL ADM - Lousaky - 22/12/2020

}
CMD:relatorio(playerid,params[]){
new string[128],GlobalTxt[128];
    if(sscanf(params, "s[128]", GlobalTxt)) return SendClientMessage(playerid, -1, "[USE]: /g [texto]");
    format(string,sizeof(string),"[CB][Civil] %s(%i):{FFFFFF} %s",GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(PlayerInfo[playerid][pAdmin] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",GetNomeCargoADM(PlayerInfo[playerid][pAdmin]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(PlayerInfo[playerid][Vip] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",NomeNivelVip(playerid),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(OC_InfOGPly[playerid][OC_IDOrg] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",OC_NomeOrg(OC_InfOGPly[playerid][OC_IDOrg]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(yMP_Emprego[playerid] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",GetNomeEmprego(yMP_Emprego[playerid]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
    ChatLocal(playerid,string,5.0,0x9966FFFF);
return 1;
}


Fiz esse comando mais n sei como coloco para as resposta irem para um adm


RE: CHAT GLOBAL ADM - Carlos_ManDraKe - 23/12/2020

(22/12/2020 23:57)Lousaky Escreveu: }
CMD:relatorio(playerid,params[]){
new string[128],GlobalTxt[128];
    if(sscanf(params, "s[128]", GlobalTxt)) return SendClientMessage(playerid, -1, "[USE]: /g [texto]");
    format(string,sizeof(string),"[CB][Civil] %s(%i):{FFFFFF} %s",GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(PlayerInfo[playerid][pAdmin] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",GetNomeCargoADM(PlayerInfo[playerid][pAdmin]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(PlayerInfo[playerid][Vip] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",NomeNivelVip(playerid),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(OC_InfOGPly[playerid][OC_IDOrg] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",OC_NomeOrg(OC_InfOGPly[playerid][OC_IDOrg]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
if(yMP_Emprego[playerid] > 0) format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",GetNomeEmprego(yMP_Emprego[playerid]),GetPlayerNameEx(playerid),playerid,GlobalTxt);
    ChatLocal(playerid,string,5.0,0x9966FFFF);
return 1;
}


Fiz esse comando mais n sei como coloco para as resposta irem para um adm

mano posta como código, slc olha esse bagulho como ta bagunçado


RE: CHAT GLOBAL ADM - Lousaky - 23/12/2020

Como?


RE: CHAT GLOBAL ADM - iacta - 23/12/2020

Reformulei o seu comando tente assim. 
Código:
CMD:relatorio(playerid,params[]){
new string[128],GlobalTxt[128];
   
if(sscanf(params, "s[128]", GlobalTxt)) return SendClientMessage(playerid, -1, "[USE]: /g [texto]");

if(PlayerInfo[playerid][pAdmin] > 0){

format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF}
%s",GetNomeCargoADM(PlayerInfo[playerid][pAdmin]),GetPlayerNameEx(playerid),playerid,GlobalTxt);

for(new i; i<MAX_PLAYERS; i++){
   if(IsPlayerLogged(i)){
     if(PlayerInfo[i][pAdmin] > 0){
       SendClientMessage(i, -1, string);
      }
    }
  }
}else if(PlayerInfo[playerid][Vip] > 0){

format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",NomeNivelVip(playerid),GetPlayerNameEx(playerid),playerid,GlobalTxt);

for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerLogged(i))
   if(PlayerInfo[i][pAdmin] > 0){
      SendClientMessage(i, -1, string);
      }
   }
}
}else if(OC_InfOGPly[playerid][OC_IDOrg] > 0){

format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",OC_NomeOrg(OC_InfOGPly[playerid]   [OC_IDOrg]),GetPlayerNameEx(playerid),playerid,GlobalTxt);

for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerLogged(i))
   if(PlayerInfo[i][pAdmin] > 0){
      SendClientMessage(i, -1, string);
      }
    }
  }
}else if(yMP_Emprego[playerid] > 0){

format(string,sizeof(string),"[CB][%s] %s(%i):{FFFFFF} %s",GetNomeEmprego(yMP_Emprego[playerid]),GetPlayerNameEx(playerid),playerid,GlobalTxt);

for(new i; i<MAX_PLAYERS; i++){
if(IsPlayerLogged(i))
   if(PlayerInfo[i][pAdmin] > 0){
      SendClientMessage(i, -1, string);
       }
    }
  }
}else{

format(string,sizeof(string),"[CB][Civil] %s(%i):{FFFFFF} %s",GetPlayerNameEx(playerid),playerid,GlobalTxt);

for(new i = 0; i<MAX_PLAYERS; i++)
   if(IsPlayerLogged(i)){
      if(PlayerInfo[i][pAdmin] > 0){         {
         SendClientMessage(i, -1, string);
         }
      }
   }
}
return 1;
}



RE: CHAT GLOBAL ADM - Gustavo P - 23/12/2020

Só complementando você precisa fazer mais verificações provavelmente, por exemplo e se eu for vip e adm? vip e de emprego? e se eu tenho emprego e sou de org?