SA-MP Forums Archive
[Pedido] Administrador usou tal comando. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] Administrador usou tal comando. (/showthread.php?tid=479729)



Administrador usou tal comando. - Zepetto67 - 06.12.2013

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;
}




Re: Administrador usou tal comando. - WLSF - 06.12.2013

Nгo entendi qual й o problema...


Re: Administrador usou tal comando. - iDreak - 06.12.2013

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;
}



Re: Administrador usou tal comando. - Zepetto67 - 07.12.2013

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.


Re: Administrador usou tal comando. - PT - 07.12.2013

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.