[ajuda] Comando Health
#6

__________________________________________________ ______________________
Aqui o Cуdigo Tente Este:
pawn Код:
if(strcmp(cmd, "/curar", true) == 0)
    {
    new Float:health; //New para as Variveis
      new tmp2[256]; //new para Variaveis
      tmp = strtok(cmdtext, idx);
        new otherplayer; //Outros Players
        tmp2 = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFF444499, "/curar PlayerID");
        if(!strlen(tmp2)) return SendClientMessage(playerid, 0xFF444499, "/curar PlayerID");
        if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, 0xFF444499, "id invalido.");
        if (health < 50.0)
      SetPlayerHealth(otherplayer, 100);
        return 1;
    }
//----
Dever Ser Colocado Abaixo de:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
Caso de Erro Entгo Coloque Isto Abaixo para Garantir:
pawn Код:
new cmd[256];
    new tmp[256];
    new Message[256];
    new gMessage[256];
    new pName[MAX_PLAYER_NAME+1];
    new iName[MAX_PLAYER_NAME+1];
    new idx;
Reply


Messages In This Thread
[ajuda] Comando Health - by Rick_DR - 17.04.2010, 16:30
Re: [ajuda] Comando Health - by ipsBruno - 17.04.2010, 16:31
Re: [ajuda] Comando Health - by Rick_DR - 17.04.2010, 17:01
Re: [ajuda] Comando Health - by ipsBruno - 17.04.2010, 17:43
Re: [ajuda] Comando Health - by Rick_DR - 17.04.2010, 17:49
Re: [ajuda] Comando Health - by ipsBruno - 17.04.2010, 17:53
Re: [ajuda] Comando Health - by Rick_DR - 17.04.2010, 17:56
Re: [ajuda] Comando Health - by BiGGaMeS - 17.04.2010, 17:57
Re: [ajuda] Comando Health - by Rick_DR - 17.04.2010, 18:02
Re: [ajuda] Comando Health - by BiGGaMeS - 17.04.2010, 18:10

Forum Jump:


Users browsing this thread: 3 Guest(s)