Ayuda
#2

pawn Код:
CMD:sethealth(playerid, params[]) {
    new id = -1, Float:hp;
    if(sscanf(params, "uf", id, hp)) return SendClientMessageEx(playerid, COLOR_RED, "Usa: {FFFFFF}/sethp [ID] [health]");

    if(!IsPlayerConnected(id)) return SendClientMessageEx(playerid, COLOR_RED, "{FF0000}» Error: {FFFFFF}Jugador no encontrado.");


    SetPlayerHealth(id, hp);

    new str[128];
    format(str, sizeof(str), "** %s has set %s's HP to: %0.2f", PlayerName(playerid), PlayerName(id), hp);
    SendClientMessageToAll(COLOR_YELLOW, str);

    return 1;
}
requiere sscanf
Reply


Messages In This Thread
Ayuda - by Glimma - 27.08.2012, 19:53
Respuesta: Ayuda - by adrianxd - 27.08.2012, 20:18
Respuesta: Ayuda - by Fluid016 - 27.08.2012, 20:23
Re: Ayuda - by Daniel-92 - 27.08.2012, 20:27
Re: Ayuda - by Glimma - 27.08.2012, 20:30

Forum Jump:


Users browsing this thread: 1 Guest(s)