Comando simple
#1

Hola, no queria llegar aqui por esto pero se me acaba el tiempo y quiero terminarlo... seguramente a muchos les parecera estupido pero necesito ayuda con esto:

pawn Код:
dcmd_health(playerid,params[])
{
    {
        new jugadorid;
        new string[128];
        new pName[24];
        GetPlayerName(playerid, pName, 24);
        if(sscanf(params,"u",jugadorid)) return SCM(playerid, -1, "USAGE: /health [id]");
        if(!IsPlayerConnected(jugadorid)) return SCM(playerid,COLOR_RED,"ERROR: Jugador no conectado.");
        SetPlayerHealth(jugadorid, 100);
        format(string,sizeof(string),"Recargaste la salud de {FFFFFF}%s",pName);
        SendClientMessage(playerid,COLOR_ORANGE,string);
    }
    return 1;
}
Lo que pasa es que cuando pongo /health id hace su funcion pero en el mensaje pone el nombre de quien ejecuta el comando y no del jugador al que se le aplica el comando .. Como soluciono?
Reply


Messages In This Thread
Comando simple - by FlavioCesar - 12.01.2015, 21:02
Respuesta: Comando simple - by jotajeda - 12.01.2015, 21:04
Respuesta: Comando simple - by FlavioCesar - 12.01.2015, 21:18
Respuesta: Comando simple - by Zume - 12.01.2015, 21:25
Respuesta: Comando simple - by jotajeda - 12.01.2015, 21:33
Respuesta: Comando simple - by FlavioCesar - 12.01.2015, 21:45
Respuesta: Comando simple - by JuanStone - 12.01.2015, 22:41

Forum Jump:


Users browsing this thread: 1 Guest(s)