SA-MP Forums Archive
Comandos por Nicks - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Comandos por Nicks (/showthread.php?tid=273726)



Comandos por Nicks - Fede.Zink - 03.08.2011

Hola Foro Samp

Bueno antes de explicar un comando para hacer referencia:

pawn Код:
if(!strcmp(cmdtext, "/Comando", true))
{
new nick[24];
GetPlayerName(playerid,nick,24);
if(!strcmp(nick, "Nick_Nick", true))
    {
        if(PlayerToPoint(4, playerid,1006.7184,-672.9726,121.1484))
           {
               SendClientMessage(playerid, COLOR_ROJO,"ES UN COMANDO DE EJEMPLO !.");
                }
    }
    else
{
SendClientMessage(playerid, COLOR_GREY,"No PUEDES USAR EL COMANDO !");
    return 1;
 }
Bueno lo que yo quiero hacer es que los nicks que no son el que elijo les de el mensaje

No PUEDES USAR EL COMANDO

Pero si por ejemplo el nick : Nick2_Nick2
usa el comando le de un mensaje
Pero la verdad que no se como :P ajja
Ojala me puedan ayudar
Desde Ya gracias


Respuesta: Comandos por Nicks - [J]ulian - 03.08.2011

їAsн decнas? їQue dos personas puedan utilizar el comando?
pawn Код:
if(!strcmp(cmdtext, "/comando", true))
{
    new nick[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nick, sizeof(nick));
    if(!strcmp(nick, "Nick_Nick", false) || !strcmp(nick, "Nick2_Nick2", false))
    {
        if(PlayerToPoint(4, playerid, 1006.7184, -672.9726, 121.1484))
        {
            return 1;
        }
    }
    else return SendClientMessage(playerid, COLOR_GREY,"No puedes utilizar este comando.");
}



Respuesta: Comandos por Nicks - Fede.Zink - 03.08.2011

No que A un Nick (el Nick_Nick) use el comando y lo deje
Si no es ese nick osea cualkier nick (Cualquiera_Cualquiera) le de el mensaje: No PUEDES USAR EL COMANDO
Pero si el nick (Nick2_Nick2) le de un mensaje como: que haces aqui??
Entendes?
que si es el (Nick2_Nick2) le de un mensaje que le salga a el solo y no pueda usar el comando!


Re: Comandos por Nicks - dis77urbio - 03.08.2011

Algo asi??


pawn Код:
if(!strcmp(cmdtext, "/Comando", true))
{
        new nick1[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nick1, sizeof(nick1));
        new nick2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nick2, sizeof(nick2));
        if(!strcmp("nick1_nick1",nick1,true))
        {
        if(!strcmp("nick2_nick2",nick2,true))
        {
        if(PlayerToPoint(4, playerid,1006.7184,-672.9726,121.1484))
           {
               SendClientMessage(playerid, COLOR_ROJO,"ES UN COMANDO DE EJEMPLO !.");
                }
    }
    else
{
SendClientMessage(playerid, COLOR_GREY,"No PUEDES USAR EL COMANDO !");
}
else
{
SendClientMessage(playerid, COLOR_GREY,"MENSAJE PARA NICK2 !");
    return 1;
 }



Respuesta: Comandos por Nicks - [J]ulian - 03.08.2011

pawn Код:
if(!strcmp(cmdtext, "/comando", true))
{
    new nick[MAX_PLAYER_NAME];
    GetPlayerName(playerid, nick, sizeof(nick));
    if(!strcmp(nick, "Acб_ElNICK", false))
    {
        if(PlayerToPoint(4, playerid, 1006.7184, -672.9726, 121.1484))
        {
            return 1;
        }
    } else return SendClientMessage(playerid, COLOR_GREY,"No puedes utilizar este comando.");
}
Asн entonces...


Respuesta: Re: Comandos por Nicks - Fede.Zink - 03.08.2011

Quote:
Originally Posted by dis77urbio
Посмотреть сообщение
Algo asi??


pawn Код:
if(!strcmp(cmdtext, "/Comando", true))
{
        new nick1[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nick1, sizeof(nick1));
        new nick2[MAX_PLAYER_NAME];
        GetPlayerName(playerid, nick2, sizeof(nick2));
        if(!strcmp("nick1_nick1",nick1,true))
        {
        if(!strcmp("nick2_nick2",nick2,true))
        {
        if(PlayerToPoint(4, playerid,1006.7184,-672.9726,121.1484))
           {
               SendClientMessage(playerid, COLOR_ROJO,"ES UN COMANDO DE EJEMPLO !.");
                }
    }
    else
{
SendClientMessage(playerid, COLOR_GREY,"No PUEDES USAR EL COMANDO !");
}
else
{
SendClientMessage(playerid, COLOR_GREY,"MENSAJE PARA NICK2 !");
    return 1;
 }
з

Esoo Exaactamente Eso!! Muchas Grasias !!!


Re: Comandos por Nicks - dis77urbio - 03.08.2011

De nada ^^