Ayuda con comando revive
#5

Quote:
Originally Posted by ErickPuga234
Посмотреть сообщение
Prueba:
pawn Код:
CMD:revive(playerid, params[])
{

if(Informacion[params[0]][Admin] >= 3) return Mensaje(playerid, AZUL , "No es administrador");
if(!sscanf(params, "i", params[0])) return Mensaje(playerid, AZUL , "Use: /revive [ID]");
if(!IsPlayerConnected(params[0])) return Mensaje(playerid, AZUL , "Id Erronea");
new Float:mvida;
GetPlayerHealth(playerid, mvida);
if(mvida >= 10) {
SetPlayerHealth(params[0], 50);
TogglePlayerControllable(params[0], 1);
}else return Mensaje(playerid, AZUL , "El Jugador no necesita ser revivido");
return 1;
}
No sirvio men pero +rep

Quote:
Originally Posted by OTACON
Посмотреть сообщение
pawn Код:
CMD:revive(playerid, params[]){
    new jugador;
    if(Informacion[playerid][Admin] < 3) return Mensaje(playerid, AZUL, "No es administrador");
    if(!sscanf(params, "r", jugador)) return Mensaje(playerid, AZUL, "Use: /revive [ID]");
    if(jugador == INVALID_PLAYER_ID) return Mensaje(playerid, AZUL, "Id Erronea");

    new Float:mvida;
    GetPlayerHealth(jugador, mvida);
    if(mvida >= 10){ return Mensaje(playerid, AZUL, "El Jugador no necesita ser revivido");
   
    SetPlayerHealth(jugador, 50);
    TogglePlayerControllable(jugador, 1);
    Mensaje(jugador, AZUL, "reviviste");
    return true;
}
Tampoco xD +rep

Quote:
Originally Posted by unuky
Посмотреть сообщение
pawn Код:
CMD:revive(playerid, params[])
{
    if(Informacion[playerid][Admin] >= 3)
    {
        if(!sscanf(params, "i", params[0]))
        {
            if(params[0] != INVALID_PLAYER_ID)
            {
                new Float:mvida;
                GetPlayerHealth(playerid, mvida);
                if(mvida >= 10)
                {
                    SetPlayerHealth(params[0], 50);
                    TogglePlayerControllable(params[0], 1);
                }
                else
                {
                    Mensaje(playerid, AZUL , "El Jugador no necesita ser revivido");
                }
            }
            else
            {
                Mensaje(playerid, AZUL , "Id Erronea");
            }
        }
        else
        {
            Mensaje(playerid, AZUL , "Use: /revive [ID]");
        }
    }
    else
    {
    Mensaje(playerid, AZUL , "No es administrador");
    }
return 1;
}
Este medio sirve por que no me dice que no necesito ser revivido osea si tengo 80 de vida de todas formas me revive..

Pero ahy lo arregle gracias! Problema solucionado.
Reply


Messages In This Thread
Ayuda con comando revive - by Daniel_Ruiz - 19.04.2014, 02:43
Respuesta: Ayuda con comando revive - by ErickPuga234 - 19.04.2014, 02:51
Respuesta: Ayuda con comando revive - by OTACON - 19.04.2014, 02:51
Respuesta: Ayuda con comando revive - by unuky - 19.04.2014, 10:13
Respuesta: Ayuda con comando revive - by Daniel_Ruiz - 19.04.2014, 20:16

Forum Jump:


Users browsing this thread: 1 Guest(s)