[Pedido] Administrador usou tal comando.
#1

Olб, por exemplo eu uso o /av. Ai aparecer para todos os Admins "Administrador(a) Zepetto usou o comando: /av"

Codigo de exemplo, quem poder ajuda pf.

Quote:

CMD:av(playerid,params[])
{
if(Player[playerid][admin] <= 0) return SendClientMessage(playerid,azul,"Comando so para admins!");
new a[170];
format(a,sizeof a,"Admin %s: {FFFFFF}%s",GetName(playerid),params);
SendClientMessageToAll(rosa,a);
return 1;
}

Reply
#2

Nгo entendi qual й o problema...
Reply
#3

Acho q й isso que vocк quer
pawn Код:
CMD:av(playerid,params[])
{
    if(Player[playerid][admin] <= 0) return SendClientMessage(playerid,azul,"Comando so para admins!");
    new a[170], _@Str[128], NomePlayer[20];
    GetPlayerName(playerid, NomePlayer, 20);
    format(a,sizeof a,"Admin %s: {FFFFFF}%s",GetName(playerid),params);
    SendClientMessageToAll(rosa,a);
    for(new i; i < MAX_PLAYERS; i++
        if(IsPlayerConnected(i)) {
            if(Player[i][admin] > 0) {
                format(_@Str, 128, "o Admin %s usou o Comando /Av", NomePlayer(playerid));
                SendClientMessage(i, -1, _@Str);
            }
        }
    }
    return 1;
}
Reply
#4

Quote:
Originally Posted by iDreak
Посмотреть сообщение
Acho q й isso que vocк quer
pawn Код:
CMD:av(playerid,params[])
{
    if(Player[playerid][admin] <= 0) return SendClientMessage(playerid,azul,"Comando so para admins!");
    new a[170], _@Str[128], NomePlayer[20];
    GetPlayerName(playerid, NomePlayer, 20);
    format(a,sizeof a,"Admin %s: {FFFFFF}%s",GetName(playerid),params);
    SendClientMessageToAll(rosa,a);
    for(new i; i < MAX_PLAYERS; i++
        if(IsPlayerConnected(i)) {
            if(Player[i][admin] > 0) {
                format(_@Str, 128, "o Admin %s usou o Comando /Av", NomePlayer(playerid));
                SendClientMessage(i, -1, _@Str);
            }
        }
    }
    return 1;
}
Exatamnete, dessa maneira, deixa eu testar.

@edit:
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1317) : error 001: expected token: ")", but found "if"
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1319) : error 012: invalid function call, not a valid address
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1319) : warning 215: expression has no effect
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1319) : error 001: expected token: ";", but found ")"
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1319) : error 029: invalid expression, assumed zero
C:\Users\JosePC\Desktop\harddm\gamemodes\hard.pwn( 1319) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.
Reply
#5

pawn Код:
CMD:av(playerid,params[])
{
    if(Player[playerid][admin] <= 0) return SendClientMessage(playerid,azul,"Comando so para admins!");
    new a[170], new pt2[128];
    format(a,sizeof a,"Admin %s: {FFFFFF}%s", GetName(playerid),params);
    SendClientMessageToAll(rosa,a);
    for(new pt = 0; pt < MAX_PLAYERS; pt++)
    {
        if(IsPlayerConnected(i))
        {
            if(Player[i][admin] != 0)
            {
                format(pt2, sizeof(pt2), "O admin %s usou o comando /av", GetName(playerid));
                SendClientMessage(i, -1, pt2);
            }
        }
    }
    return 1;
}
ve se e isso.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)