Jump to content
  • 0

Bug


Shad0wdpbgd

Question

Salut, stie cineva de ce am acest bug? adica imi pune in baza de date insurancepoints -1 chiar daca eu am pus sa dea --...


    if(vehicle_personal[vehicleid] > -1)
    {
        new id = vehicle_personal[vehicleid];

        PersonalVehicle[id][pvInsurancePoints] --;
        SCMF(id, -1, "DEBUG: %d", PersonalVehicle[id][pvInsurancePoints]);

        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `server_personal_vehicles` SET `InsurancePoints` = '%d' WHERE `ID` = '%d'", PersonalVehicle[id][pvInsurancePoints], PersonalVehicle[id][pvID]);
        mysql_tquery(SQL, gQuery, "", "");
    }

 

si la debug scrie tot aia : -1

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

 if(vehicle_personal[vehicleid] > -1 && PersonalVehicle[vehicleid][pvInsurancePoints] > 0)
    {
        new id = vehicle_personal[vehicleid];

        PersonalVehicle[id][pvInsurancePoints] --;
        SCMF(id, -1, "DEBUG: %d", PersonalVehicle[id][pvInsurancePoints]);

        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `server_personal_vehicles` SET `InsurancePoints` = '%d' WHERE `ID` = '%d'", PersonalVehicle[id][pvInsurancePoints], PersonalVehicle[id][pvID]);
        mysql_tquery(SQL, gQuery, "", "");
    }

Link to comment
Share on other sites

  • 0
54 minutes ago, hanako said:

 if(vehicle_personal[vehicleid] > -1 && PersonalVehicle[vehicleid][pvInsurancePoints] > 0)
    {
        new id = vehicle_personal[vehicleid];

        PersonalVehicle[id][pvInsurancePoints] --;
        SCMF(id, -1, "DEBUG: %d", PersonalVehicle[id][pvInsurancePoints]);

        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof(gQuery), "UPDATE `server_personal_vehicles` SET `InsurancePoints` = '%d' WHERE `ID` = '%d'", PersonalVehicle[id][pvInsurancePoints], PersonalVehicle[id][pvID]);
        mysql_tquery(SQL, gQuery, "", "");
    }

bro acm daca o explodez nu imi mai scade nimic

Link to comment
Share on other sites

  • 0

incearca asa

if(vehicle_personal[vehicleid] > -1) 
    {
        new id = vehicle_personal[vehicleid];

        PersonalVehiclei[id][pvInsurancePoints]--;
        
        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof gQuery, "UPDATE `server_personal_vehicles` SET `Insurancepoints` = '%d' WHERE `ID` = '%d'", PersonalVehicle[id][pvInsurancePoints], PersonalVehicle[id][pvID]);
        mysql_tquery(SQL, gQuery, "", "");

        SCMf(getVehOwner(PersonalVehicle[id][pvOwnerID]), -1, "Vehiculul tau %s, a pierdut un punct de asigurare.", GetVehicleName(PersonalVehicle[id][pvModelID]));
    }
 

Link to comment
Share on other sites

  • 0
7 minutes ago, hanako said:

incearca asa

if(vehicle_personal[vehicleid] > -1) 
    {
        new id = vehicle_personal[vehicleid];

        PersonalVehiclei[id][pvInsurancePoints]--;
        
        gQuery[0] = (EOS);
        mysql_format(SQL, gQuery, sizeof gQuery, "UPDATE `server_personal_vehicles` SET `Insurancepoints` = '%d' WHERE `ID` = '%d'", PersonalVehicle[id][pvInsurancePoints], PersonalVehicle[id][pvID]);
        mysql_tquery(SQL, gQuery, "", "");

        SCMf(getVehOwner(PersonalVehicle[id][pvOwnerID]), -1, "Vehiculul tau %s, a pierdut un punct de asigurare.", GetVehicleName(PersonalVehicle[id][pvModelID]));
    }
 

Multumesc. T/C

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By St3f4n36
      Salut, nu pot sa inteleg dc cand dau /createvehicle si setez factiune, rank etc. Nu imi creaza bine vehiculele, lucrez pe gm HPQ123 si chiar imi da cu virgula. Stiti de la ce ar putea fi?
      Daca doriti va trimit comenzile din .pwn
    • By Rby Robert
      cand dau /ad pe server scriu acolo /ad Recrutez in clanul .... nu apare ad pe server apare la staff Preview ad dar pe server la playerii nu apare
      Aceasta este comanda
      YCMD:ad(playerid, params[], help) {
          if(AdTimer[playerid] != 0) return SCM(playerid, COLOR_LGREEN, "Ai pus un anunt recent. Foloseste comanda /myad pentru a-l vedea.");
          new string[264],idx;
          if(!PlayerInfo[playerid][pPhone]) return SCM(playerid, COLOR_LGREEN, "Nu ai un telefon.");
          if(PlayerInfo[playerid][pMuted] == 1) {
              format(string, sizeof(string), "You can't talk right now! You are muted. (%d seconds)",PlayerInfo[playerid][pMuteTime]);
              SCM(playerid, COLOR_GREY, string);
              return true;
          }
          if(PlayerInfo[playerid][pLevel] < 5) return SCM(playerid, COLOR_GREY, "Ai nevoie de nivel 5 pentru a da un anunt!");
          new length = strlen(params);
          while ((idx < length) && (params[idx] <= ' ')) idx++;
          new offset = idx, result[264];
          while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
              result[idx - offset] = params[idx];
              idx++;
          }
          result[idx - offset] = EOS;
          new totalads = TotalAds()+1;
          if(PlayerToPoint(10, playerid, BizzInfo[11][bEntranceX], BizzInfo[11][bEntranceY], BizzInfo[11][bEntranceZ])) {
              if(!strlen(result)) return SCM(playerid, COLOR_GREY, "Usage:{FFFFFF}/ad <Text>");
              if(FaceReclama(result)) return Reclama(playerid, result);
              new payout = BizzInfo[14][bFee];
              if(PlayerMoney(playerid, payout)) {
                  format(string, sizeof(string), "* Ai folosit %d caractere si anuntul costa $%s, Nu ai banii necesari", offset, FormatNumbers(payout));
                  SCM(playerid, COLOR_WHITE, string);
                  return true;
              }
              GivePlayerCash(playerid, 0, payout);
              format(string, sizeof(string), "~r~Ai platit $%d~n~~w~Mesajul contine: %d caractere", payout, idx);
              GameTextForPlayer(playerid, string, 5000, 5);
              format(AdText[playerid], 256, result);
              format(string, sizeof(string), "[PREV AD] %s ({FFFFFF}%d{00D900}): %s", GetName(playerid), playerid, result);
              SendStaffMessage(0xDE1414FF, string);
              AdTimer[playerid] = totalads*60;
              new timer;        
              timer = SetTimerEx("Advertisment", totalads*60000, 0, "d", playerid);
              SetPVarInt(playerid, "AdTimer", timer); 
              format(string, sizeof(string), "Anuntul tau va fi afisat in %d minute (%d secunde).", AdTimer[playerid]/60, AdTimer[playerid]);
              SCM(playerid, -1, string);
              BizzInfo[14][bBalance] += payout;
              new str[128];
              mysql_format(SQL,str,128,"UPDATE bizz SET `Till`='%d',`Products`='%d' WHERE `ID`='1'",BizzInfo[14][bBalance],BizzInfo[14][bProducts]);
              mysql_tquery(SQL,str, "", "");
          }
          else SCM(playerid, -1, "Nu esti la CNN.");
          return true;
      }
      function Advertisment(playerid) {
          if(IsPlayerConnected(playerid) && AdTimer[playerid] != 0) {
              new string[1024];
              format(string, sizeof(string), "Ad by %s (phone: {FFFFFF}%d{00D900}): %s",GetName(playerid),PlayerInfo[playerid][pPhone],AdText[playerid]);
              SendMessage(0x00D900FF, string);
              AdTimer[playerid] = 0;
          }
          return true;
      }
      function TotalAds() {
          new x;
          foreach(Player, i) {
              if(IsPlayerConnected(i) && AdTimer[i] != 0) x++;
          }
          return x;
      }
    • By TheGodfather
      Salut, cand dau /park, parcheaza masina corect dar daca ma uit in /v imi spune ca este "occupied" chiar daca eu nu mai sunt in ea. Ma scoate cand dau /park.
      YCMD:park(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          new car = GetPlayerVehicleID(playerid);
          if(!IsPlayerInAnyVehicle(playerid)) 
              return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in your vehicle.");
          
          if(Iter_Count(MyVehicle[playerid]) == 0) 
              return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You do not have a personal vehicle!");
          
          if(PersonalCar(playerid) == -1) 
              return SCM(playerid, COLOR_ERROR, "Error: {FFFFFF}You are not in one of your vehicles!");
          
          if(GetPlayerState(playerid) != 2) 
              return SCM(playerid, COLOR_GREEN, "* You need to drive the car in order to use this command!");
          new idd = PersonalCar(playerid);
          new Float: vhp;
          GetVehicleHealth(car, vhp);
          if(vhp < 800) return SCM(playerid, COLOR_GREY, "You can not park the car because it has less than 800 'health'!");
          if(PlayerToPoint(150, playerid, 564.1226, -1270.0704, 17.2477)) return SCM(playerid, COLOR_ERROR, "INFO: {FFFFFF}You can not park the car near the spawn.");
          new Float:x, Float:y, Float:z, Float:a;
          saveTuning(playerid, CarInfo[idd][Spawned]);
          GetVehiclePos(car, x, y, z);
          GetVehicleZAngle(car, a);
          CarInfo[idd][cLocationx] = x;
          CarInfo[idd][cLocationy] = y;
          CarInfo[idd][cLocationz] = z;
          CarInfo[idd][cTime] = gettime()+600;
          CarInfo[idd][cAngle] = a;
          CarInfo[idd][cVirtual] = GetPlayerVirtualWorld(playerid);
          DestroyVehicle(car);
          if(strlen(CarInfo[idd][cText]) >= 3) {
              DestroyDynamicObject(nameobject[CarInfo[idd][Spawned]]);
          }
          CarInfo[idd][Spawned] = CreateVehicleEx(CarInfo[idd][cModel],CarInfo[idd][cLocationx],CarInfo[idd][cLocationy],CarInfo[idd][cLocationz],CarInfo[idd][cAngle],CarInfo[idd][cColorOne],CarInfo[idd][cColorTwo], -1, 0);
          SetVehicleVirtualWorld(CarInfo[idd][Spawned], CarInfo[idd][cVirtual]);
          attach_vip_text(idd);
          SetVehicleHealth(CarInfo[idd][Spawned], CarInfo[idd][cVip] ? 2000 : 1000);
          SetTunning(idd);
          SetVehicleNumberPlate(CarInfo[idd][Spawned], CarInfo[idd][cLicense]);
          saveCar(idd);
          new Float: Pos[3];
          GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
          CarInfo[idd][cLastPos][0] = Pos[0];
          CarInfo[idd][cLastPos][1] = Pos[1];
          CarInfo[idd][cLastPos][2] = Pos[2];
          return true;
      }
      function IsVehicleOccupied(vehicleid) return VehicleOccupied[vehicleid] != 0 ? (true) : (false);
      stock ShowPlayerVehicle(playerid, bool: type) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          new szTitle[2000], szDialog[2000], x = 0;
          if(Iter_Count(MyVehicle[playerid]) == 0) 
              return SCM(playerid, COLOR_LGREEN, "Error: You do not have a personal vehicle!");
          
          format(szTitle, sizeof(szTitle), "Your Vehicles {E3DE31}%d/%d", Iter_Count(MyVehicle[playerid]), GetSlots(playerid));
          strcat(szDialog, "Vehicul\tStatus\tDespawn Time\tOthers details\n");
          foreach(MyVehicle[playerid], car) {
              format(szDialog, sizeof(szDialog), "%s%s\t%s\t%s\t%s\n", szDialog, aVehicleNames[CarInfo[car][cModel]-400], CarInfo[car][Spawned] != 0 ? IsVehicleOccupied(CarInfo[car][Spawned]) ? ("{FFFF00}[occupied]") : ("{26B309}[spawned]") : ("{FF0000}[despawned]"), CheckDespawnCar(car), TotalUp(car)); 
              PlayerInfo[playerid][pCarKey][x] = car;
              x++;
          }
          ShowPlayerDialog(playerid, type ? DIALOG_STICKET : DIALOG_GARAGE, DIALOG_STYLE_TABLIST_HEADERS, szTitle, szDialog, "Ok", "Exit");
          return true;
      }
    • By Rby Robert
      Salut. am bagat pe server niste filterscripts cu job-uri dar dupa ce le termin imi da banii fictiv gen imi apare in chat ca am primit imi creste suma in dreapta sus dar in /stats tot aceeasi bani ii am gen daca am 100$ tot 100$ am nu imi da bani de la job
      DisablePlayerCheckpoint(playerid);
              SendClientMessage(playerid,-1,"Ati terminat de livrat coletele si ati castigat o suma de bani,felicitari!");
              GivePlayerMoney(playerid, 500000);
              DestroyVehicle(MasinaCJ[playerid]);
      Cam asa arata liniile unde ar trebuie sa dea bani
    • By TheGodfather
      Salut, la gamemode-ul bhood hpq123 am observat ca dupa ce dau restart, turfurile se pun aiurea in /turfs. Cu siguranta mai sunt si alte probleme la sistemul de war. Aveti idee cum pot rezolva? Las mai jos ce tine de sistemul de war.
      YCMD:turfs(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          if(TurfsDisp[playerid] == 0) {
              TurfsDisp[playerid] = 1;
              for(new i = 0; i < sizeof(Turfs); i++) 
              {
                  switch(TurfInfo[i][zOwned]) {
                      case 0: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xFFFFFFAA); //None
                      case 4: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x0CAB3C99); //Grove Street
                      case 5: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x11F2F299); //Los Vagos
                      case 6: GangZoneShowForPlayerEx(playerid, Turfs[i], 0x8E541099); //Ballas
                      case 10: GangZoneShowForPlayerEx(playerid, Turfs[i], 0xAB00FA99); //Los Aztecas
                  }
              }
              SCM(playerid, -1, "You activated the turfs.");
          } else {
              TurfsDisp[playerid] = 0;
              for(new i = 0; i < sizeof(Turfs); i++) GangZoneHideForPlayerEx(playerid, Turfs[i]);
              SCM(playerid, -1, "You deactivated the turfs.");
          }
          return true;
      }
      function SQL_loadTurfs() {
          printf("Turfs: %d", cache_num_rows());    
          if(cache_num_rows() == 0)
              return true;
          new ORM:ormid;
           for(new i = 0; i < cache_num_rows(); i++) {
               ormid = orm_create("turfs");
               orm_addvar_int(ormid, TurfInfo[i][zID], "ID");
               orm_addvar_int(ormid, TurfInfo[i][zOwned], "Owned");
               orm_addvar_float(ormid, TurfInfo[i][zMinX], "MinX");
               orm_addvar_float(ormid, TurfInfo[i][zMinY], "MinY");
               orm_addvar_float(ormid, TurfInfo[i][zMaxX], "MaxX");
               orm_addvar_float(ormid, TurfInfo[i][zMaxY], "MaxY");
               orm_apply_cache(ormid, i);    
          }    
          for(new i = 0; i < sizeof(TurfInfo); i++) Turfs[i] = GangZoneCreateEx(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY],TurfInfo[i][zID],1.0);
          return true;
      }
      Functia SQL_loadTurfs este folosita la OnGamemodeInit astfel: mysql_tquery(SQL, "SELECT * FROM `turfs`", "SQL_loadTurfs", "");
      function OtherTimer() {
          new stringg[180], iswar;
          for(new w = 0; w < 16; w++) if(InWar[w] == 1) iswar = 1;
          if(iswar != 1)
              return true;
          for(new i = 0; i < sizeof(Turfs); i++) {
              new attackers = WarInfo[i][wAttacker];
              new defenders = WarInfo[i][wFaction];
              if(WarInfo[i][wTime] >= 2) {
                  foreach(Player,j) {
                      if(PlayerInfo[j][pMember] == attackers || PlayerInfo[j][pMember] == defenders) {
                          if(WarInfo[i][wAttacker] == 4) GangZoneFlashForPlayer(j,Turfs[i], 0x0CAB3C99);
                          else if(WarInfo[i][wAttacker] == 5) GangZoneFlashForPlayer(j,Turfs[i], 0x11F2F299);
                          else if(WarInfo[i][wAttacker] == 6) GangZoneFlashForPlayer(j,Turfs[i], 0x8E541099);
                          else if(WarInfo[i][wAttacker] == 10) GangZoneFlashForPlayer(j,Turfs[i], 0xAB00FA99);
                      }
                  }
              }
              if(WarInfo[i][wTime] > 0) {
                  WarInfo[i][wTime] -= 1;
                  foreach(Player,j) {
                      if(IsPlayerInTurf(j,i) == 1) {
                          if(PlayerInfo[j][pMember] == attackers) WarScoreF[attackers][i] += 0.002;
                          if(PlayerInfo[j][pMember] == defenders) WarScoreF[defenders][i] += 0.002;
                      }
                  }
                  if(WarInfo[i][wTime] == 1) {
                      new Float: atscore = 0.0;
                      new Float: defscore = 0.0;
                      atscore = WarScoreF[attackers][i];
                      defscore = WarScoreF[defenders][i];
                      new winner;
                      SetVehicle(attackers, 0);
                      SetVehicle(defenders, 0);
                      foreach(Player,j) {
                          if(PlayerInfo[j][pMember] == attackers) {
                              SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------");
                              RespawnVehicle(attackers);
                              GangZoneStopFlashForPlayer(j,Turfs[i]);
                              format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i+1);
                              SCM(j, COLOR_MONEY,stringg);
                              //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200);
                              PlayerTextDrawHide(j, WarTime);
                          }
                          if(PlayerInfo[j][pMember] == defenders) {
                              SCM(j, COLOR_MONEY, "--------------------- WAR Statistics ---------------------");
                              RespawnVehicle(defenders);
                              GangZoneStopFlashForPlayer(j,Turfs[i]);
                              format(stringg,sizeof(stringg),"War between %s and %s for turf %d is over.",FactionName(attackers),FactionName(defenders),i);
                              SCM(j, COLOR_MONEY,stringg);
                              //for(new m = 0; m < 5; m++) SendDeathMessageToPlayer(j, 1001, 1001, 200);
                              PlayerTextDrawHide(j, WarTime);
                          }
                      }
                      DestroyPickups(i);
                      if(atscore > defscore) winner = 1;
                      else winner = 2;
                      new winbest, losebest;
                      new winbestj = -1, losebestj = -1;
                      new bestname1[25],bestname2[25],bestname[25],worstname[25];
                      FactionDeelay[attackers] = 300;
                      foreach(Player,j) {
                          if(winner == 1) {
                              if(PlayerInfo[j][pMember] == attackers) {
                                  winbest = bestscoreat[i];
                                  if(bestmemberat[i] != 999) {
                                      if(PlayerInfo[bestmemberat[i]][pMember] == attackers) {
                                          winbestj = bestmemberat[i];
                                          GetPlayerName(winbestj,bestname1,sizeof(bestname1));
                                          strmid(bestname, bestname1, 0, strlen(bestname1), 255);
                                      }
                                  }
                                  else {
                                      format(bestname,sizeof(bestname),"Null");
                                      strmid(bestname, bestname, 0, strlen(bestname), 255);
                                  }
                              }
                              if(PlayerInfo[j][pMember] == defenders) {
                                  losebest = worstscoredf[i];
                                  if(worstmemberdf[i] != 999) {
                                      if(PlayerInfo[worstmemberdf[i]][pMember] == defenders) {
                                          losebestj = worstmemberdf[i];
                                          GetPlayerName(losebestj,bestname2,sizeof(bestname2));
                                          strmid(worstname, bestname2, 0, strlen(bestname2), 255);
                                      }
                                  }
                                  else {
                                      format(worstname,sizeof(worstname),"Null");
                                      strmid(worstname, worstname, 0, strlen(worstname), 255);
                                  }
                              }
                          }
                          if(winner == 2) {
                              if(PlayerInfo[j][pMember] == defenders) {
                                  winbest = bestscoredf[i];
                                  if(bestmemberdf[i] != 999) {
                                      if(PlayerInfo[bestmemberdf[i]][pMember] == defenders) {
                                          winbestj = bestmemberdf[i];
                                          GetPlayerName(winbestj,bestname1,sizeof(bestname1));
                                          strmid(bestname, bestname1, 0, strlen(bestname1), 255);
                                      }
                                  }
                                  else {
                                      format(bestname,sizeof(bestname),"Null");
                                      strmid(bestname, bestname, 0, strlen(bestname), 255);
                                  }
                              }
                              if(PlayerInfo[j][pMember] == attackers) {
                                  losebest = worstscoreat[i];
                                  if(worstmemberat[i] != 999) {
                                      if(PlayerInfo[worstmemberat[i]][pMember] == attackers) {
                                          losebestj = worstmemberat[i];
                                          GetPlayerName(losebestj,bestname2,sizeof(bestname2));
                                          strmid(worstname, bestname2, 0, strlen(bestname2), 255);
                                      }
                                  }
                                  else {
                                      format(worstname,sizeof(worstname),"Null");
                                      strmid(worstname, worstname, 0, strlen(worstname), 255);
                                  }
                              }
                          }
                      }
                      foreach(Player,j) {
                          new uciderii = 0;
                          uciderii += ucideri[j][i];
                          new decesee = 0;
                          decesee += decese[j][i];
                          ucideri[j][i] = 0;
                          decese[j][i] = 0;
                          
                          if((PlayerInfo[j][pMember] == attackers) || (PlayerInfo[j][pMember] == defenders)) {
                              SetPlayerVirtualWorld(j, 0);
                              if(WarSeconds[j] >= 300) {
                                  //UpdateFactionRaport(j, 0);
                                  //edisonraport
                                  AddRaportPoint(j);
                                  //edisonraport
                              }
                              WarSeconds[j] = 0;
                              if(winner == 1) {                    
                                  format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wAttacker]),atscore,FactionName(WarInfo[i][wFaction]),defscore);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee, uciderii, decesee);
                                  SCM(j, COLOR_MONEY,stringg);
                                  TurfInfo[i][zOwned] = WarInfo[i][wAttacker];
                                  Wartimeon[j] = 0;
                              }
                              if(winner == 2) {
                                  format(stringg,sizeof(stringg),"%s (%.1f) vs %s (%.1f).",FactionName(WarInfo[i][wFaction]),defscore,FactionName(WarInfo[i][wAttacker]),atscore);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"The best: %s (%d). The worst: %s (-%d).", bestname, winbest, worstname, losebest);
                                  SCM(j, COLOR_MONEY,stringg);
                                  format(stringg,sizeof(stringg),"Your statistics: Score %d (%d kills and %d deaths).",uciderii-decesee,uciderii, decesee);
                                  SCM(j, COLOR_MONEY,stringg);
                                  Wartimeon[j] = 0;
                              }
                              SCM(j, COLOR_MONEY, "---------------------------------------------------------------");
                              WarScoreF[defenders][i] = 0.0;
                              WarScoreF[attackers][i] = 0.0;
                              InWar[attackers] = 0;
                              InWar[defenders] = 0;
                          }
                          if(winner == 1) {
                              GangZoneHideForPlayerEx(j,Turfs[i]);
                              if(attackers == 4) GangZoneShowForPlayerEx(j,Turfs[i],0x0CAB3C99);
                              if(attackers == 5) GangZoneShowForPlayerEx(j,Turfs[i],0x11F2F299);
                              if(attackers == 6) GangZoneShowForPlayerEx(j,Turfs[i],0x8E541099);
                              if(attackers == 10) GangZoneShowForPlayerEx(j,Turfs[i],0xAB00FA99);
                          }
                      }
                      if(winner == 1) {
                          new str[128];
                          mysql_format(SQL, str,128,"UPDATE `turfs` SET `Owned`='%d' WHERE `ID`='%d'",TurfInfo[i][zOwned],i);
                          mysql_tquery(SQL,str, "", "");
                      }
                      WarInfo[i][wTime] = 0;
                      WarInfo[i][wFaction] = 0;
                      WarInfo[i][wAttacker] = 0;
                      worstscoreat[i] = 0;
                      worstmemberat[i] = 999;
                      bestscoreat[i] = 0;
                      bestmemberat[i] = 999;
                      worstscoredf[i] = 0;
                      worstmemberdf[i] = 999;
                      bestscoredf[i] = 0;
                      bestmemberdf[i] = 999;
                      mysql_tquery(SQL, "UPDATE `users` SET `WarTurf`='0', `WarKills`='0', `WarDeaths`='0'", "", "");
                  }
              }
          }
          return true;
      }
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.