Comandos por Nicks
#1

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
Reply
#2

ї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.");
}
Reply
#3

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!
Reply
#4

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;
 }
Reply
#5

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...
Reply
#6

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 !!!
Reply
#7

De nada ^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)