SA-MP Forums Archive
comando a todos. - 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: comando a todos. (/showthread.php?tid=555410)



comando a todos. - Xen3ize - 07.01.2015

Hola, estoy haciendo unos comandos bбsicos y quiero saber como hacer para setear algo a todos, lo que quiero setear es virtualworld a todos, vida a todos y armadura todos.

Muchas gracias.


Re: comando a todos. - INKISICION - 07.01.2015

Usa foreach o basate de algun sistema admin, busca en el foro bajatelo y alli miras

ejemplo sin fore

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerHealth(i, 100)// 100 de vida para todos



Respuesta: comando a todos. - jotajeda - 07.01.2015

pawn Код:
CMD:skinear(playerid, params[])
{
    for (new all=0; all < MAX_PLAYERS; all++)//bucle
    {
        if(IsPlayerConnected(all))
        {
            new vieja = 199;
            SendClientMessage(all,-1"Se ha skineado a todos los users");
            SetPlayerSkin(all,vieja);
        }
     }
     return true;
}



Respuesta: comando a todos. - Swedky - 07.01.2015

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
pawn Код:
CMD:skinear(playerid, params[])
{
    for (all=0; all < MAX_PLAYERS; all++)//bucle
    {
        if(IsPlayerConnected(all))
        {
            new vieja = 199;
            SendClientMessage(all,-1"Se ha skineado a todos los users");
            SetPlayerSkin(all,vieja);
        }
     }
     return true;
}
Pregunto... para quй la variable vieja? Desperdiciar tiempo de ejecuciуn al pedo.


Respuesta: comando a todos. - OTACON - 07.01.2015

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
pawn Код:
CMD:skinear(playerid, params[])
{
    for (all=0; all < MAX_PLAYERS; all++)//bucle
    {
        if(IsPlayerConnected(all))
        {
            new vieja = 199;
            SendClientMessage(all,-1"Se ha skineado a todos los users");
            SetPlayerSkin(all,vieja);
        }
     }
     return true;
}
ese bucle esta mal. -.-


Respuesta: comando a todos. - jotajeda - 07.01.2015

Quote:
Originally Posted by EnzoMetlc
Посмотреть сообщение
Pregunto... para quй la variable vieja? Desperdiciar tiempo de ejecuciуn al pedo.
Es para aquellos que tienen integrado en sus cerebros el buen sentido del humor.

Quote:
Originally Posted by OTACON
Посмотреть сообщение
ese bucle esta mal. -.-
Correguido.


Respuesta: comando a todos. - Swedky - 07.01.2015

Quote:
Originally Posted by jotajeda
Посмотреть сообщение
Es para aquellos que tienen integrado en sus cerebros el buen sentido del humor.
No es humor, son tonterнas...


Re: comando a todos. - Xen3ize - 07.01.2015

Quote:
Originally Posted by INKISICION
Посмотреть сообщение
Usa foreach o basate de algun sistema admin, busca en el foro bajatelo y alli miras

ejemplo sin fore

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++) SetPlayerHealth(i, 100)// 100 de vida para todos

Muchas gracias, me sirviу.