#1

Quote:

COMMAND:a(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1) {
new result[128];
if(sscanf(params,"s[128]",result)) return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: /a [msg]");
new string[128],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"[A-CHAT] %s (%d): %s",Name,playerid,result);
foreach(Player,i) if(PlayerInfo[playerid][pAdmin] < 1) SendClientMessage(i,0x00FF00FF,string);
}
return 1;
}

This is my admin chat cmd but when i writte something nothing show up
Reply
#2

PHP код:
COMMAND:a(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 1
    {
        new 
result[128];
        if(
sscanf(params,"s[128]",result)) return SendClientMessage(playerid0xFFFFFFFF"SERVER: /a [msg]");
        new 
string[128],Name[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,Name,sizeof(Name));
        
format(string,sizeof(string),"[A-CHAT] %s (%d): %s",Name,playerid,result);
        foreach(
Player,i)
        {
            if(
PlayerInfo[i][pAdmin] < 1)
            {
                
SendClientMessage(i,0x00FF00FF,string);
            }    
        }
    }
    return 
1;

Reply
#3

how can i make to see admin levels?
Reply
#4

PHP код:
COMMAND:a(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 1
    {
        new 
result[128];
        if(
sscanf(params,"s[128]",result)) return SendClientMessage(playerid0xFFFFFFFF"SERVER: /a [msg]");
        new 
string[128],Name[MAX_PLAYER_NAME];
        
GetPlayerName(playerid,Name,sizeof(Name));
        
format(string,sizeof(string),"[A-CHAT] %s[AdminLevel:%i] (%i): %s",Name,PlayerInfo[i][pAdmin], playeridresult);
        foreach(
Player,i)
        {
            if(
PlayerInfo[i][pAdmin] < 1)
            {
                
SendClientMessage(i,0x00FF00FF,string);
            }    
        }
    }
    return 
1;

Reply
#5

Код:
format(string,sizeof(string),"[A-CHAT] [*%d] %s (%d): %s",PlayerInfo[playerid][pAdmin],Name,playerid,result);
Reply
#6

COMMAND:a(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] < 1)
{
new result[128];
if(sscanf(params,"s[128]",result)) return SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: /a [msg]");
new string[128],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(string,sizeof(string),"[A-CHAT] %s (%d): %s",Name,playerid,result);
foreach(Player,i)
SendClientMessage(pInfo[playerid][pAdmin],-1,string);
}
return 1;
}
Reply
#7

We already gave him the correct answer, and also yours is wrong ...
Reply
#8

Quote:

stock GetAdminRank(playerid)
{
new arank[64];
switch(PlayerInfo[playerid][pAdmin])
{
case 8: arank = "Scripter";
case 7: arank = "Owner";
case 6: arank = "Director";
case 5: arank = "Head admin";
case 4: arank = "Admin 4";
case 3: arank = "Admin 3";
case 2: arank = "Admin 2";
case 1: arank = "Admin 1";

default: arank = "None";
}
return arank;
}

But how i can make with this stock
Reply
#9

format(string,sizeof(string),"[A-CHAT] %s[AdminRank: %s] (%i): %s",Name,GetAdminRank(playerid), playerid, result);
Reply
#10

thanks + rep [edit not work]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)