comando de faccion
#3

este es el comando y porfavor alguien que lo pase a faccion se lo agradecere con el alma

pawn Код:
if(strcmp(cmd, "/guard", true) == 0)
    {
      if(IsPlayerConnected(playerid))
      {
          if(PlayerInfo[playerid][pJob] != 8)
          {
                SendClientMessage(playerid, COLOR_GREY, "  No eres un GuardaEspaldas!");
                return 1;
          }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /guard [playerid/ParteDelNombre] [precio]");
                return 1;
            }
            new money;
            giveplayerid = ReturnUser(tmp);
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp)) { return 1; }
            money = strval(tmp);
            if(money < 1 || money > 9999) { SendClientMessage(playerid, COLOR_GREY, "  Precio no menor de 1, o por ensima de 9999!"); return 1; }
            if(IsPlayerConnected(giveplayerid))
            {
              if(giveplayerid != INVALID_PLAYER_ID)
              {
                if(ProxDetectorS(8.0, playerid, giveplayerid))
                    {
                      if(giveplayerid == playerid)
                      {
                        SendClientMessage(playerid, COLOR_GREY, "  No puedes ofrecerte proteccion a ti mismo !");
                        return 1;
                      }
                      GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                      format(string, sizeof(string), "* You offerd protection to %s for $%d.", giveplayer, money);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        format(string, sizeof(string), "* GuardaEspalda %s Quiere protejerte por $%d, (Escribe /aceptar guard) para aceptar.", sendername, money);
                        SendClientMessage(giveplayerid, COLOR_WHITE, string);
                        GuardOffer[giveplayerid] = playerid;
                        GuardPrice[giveplayerid] = money;
                    }
                    else
                    {
                      SendClientMessage(playerid, COLOR_GREY, "  That player is not near you !");
                    }
                }
            }
            else
            {
              SendClientMessage(playerid, COLOR_GREY, "  That player is offline!");
            }
        }
        return 1;
    }
Reply


Messages In This Thread
comando de faccion - by SeQualX - 18.06.2010, 01:07
Re: comando de faccion - by CristianTdj - 18.06.2010, 07:53
Re: comando de faccion - by SeQualX - 19.06.2010, 07:38

Forum Jump:


Users browsing this thread: 1 Guest(s)