[AJUDA] Mensagem mensagem apenas para admin
#8

final do gm:
pawn Код:
forward MSGAdmin(color, string[]);
public MSGAdmin(color, string[])
{
    for(new i = 0; i< MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(LevelInfo[playerid][Admin] >= 1)
            {
                SendClientMessage(i, color, string);
            }
        }
    }
}
pawn Код:
if(strcmp(cmd, "/spawn", true) == 0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    new plid;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp)) {
        SendClientMessage(playerid, COR_BRANCO, "[x] Digite: /spawn [id]");
        return 1;
    }
    plid = strval(tmp);
    if(IsPlayerConnected(plid)) {
        SpawnPlayer(plid);
        new pname[MAX_PLAYER_NAME];
        GetPlayerName(plid, pname, MAX_PLAYER_NAME);
        format(string, sizeof(string), "{FBFF00}[INFO] O admin {FF0000}%s (%d) {FBFF00}deu spawn em %s (%d)!", aname,playerid,pname,plid);
        MSGAdmin(-1, string);
        return 1;
    }
    else {
        SendClientMessage(playerid, -1, "ID invбlido");
        return 1;
    }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)