SA-MP Forums Archive
MessageToAdmins - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MessageToAdmins (/showthread.php?tid=608905)



MessageToAdmins - Filbert - 06.06.2016

I can use MessageToAdmins and MessageToAll
But I cant use MessageToHG => /getallHG
This is my /getallHG command code >
PHP код:
CMD:getallhg(playerid,params[]) {
    
#pragma unused params
    
if(PlayerInfo[playerid][HGRank] >= 7) {
        
CMDMessageToAdmins(playerid,"GETAllHG"); //This Is The Problem
        
new Float:x,Float:y,Float:zinterior GetPlayerInterior(playerid);
        
GetPlayerPos(playerid,x,y,z);
           for(new 
0MAX_PLAYERSi++) {
            if(
IsPlayerConnected(i) && (!= playerid) && != ServerInfo[MaxHGRank]) {
                
PlayerPlaySound(i,1057,0.0,0.0,0.0); SetPlayerPos(i,x+(playerid/4)+1,y+(playerid/4),z); SetPlayerInterior(i,interior);
            }
        }
        new 
string[128]; format(string,sizeof(string),"HG Leader \"%s\" has teleported all HG Members"pName(playerid) );
        return 
SendClientMessageToAll(bluestring); //This Is The Second Problem. I Want It Change To SendClientMessageToHG (To HG Members)
    
} else return SendClientMessage(playerid,red,"ERROR: You need to be HG Member Rank 7 to use this command");

I Hope You Help Me And Give Me The Right Code
Thanks To People Who Help Me And God Bless You All


Re: MessageToAdmins - oMa37 - 06.06.2016

Can you show us the CMDMessageToAdmins function?


Re: MessageToAdmins - Filbert - 06.06.2016

I dont understand


Re: MessageToAdmins - Filbert - 06.06.2016

CMDMessageToAdmins is work very well
But I want MessageToAdmins change to MessageToHG (HG members)
I want it send to HG members not to admins


Re: MessageToAdmins - Pearson - 06.06.2016

Its Very simple can you give me info of hgmembers?


Re: MessageToAdmins - oMa37 - 06.06.2016

PHP код:
MessageToHG(color,Message[])
{
    foreach(new 
Player)
    {
       if(
PlayerInfo[i][HGRank] >= 7)
       
SendClientMessage(icolorMessage);
    }
    return 
1;