Jump to content
  • 0

save stats


Guest No_name

Question

Guest No_name

Salut sunt nou aici

Am si eu o intrebare

Am auzit ca este un include ceva nu stiu sigur care salveaza datele banii armele scoru tot intr-un fisier din scriptfiles dar nu imi amintesc cum se numeste.

Puteti sa imi spuneti voi sau sa imi dati chiar voi un exemplu despre cum sa fac asta.

Am mai facut eu un script dinala sa salveze dar nu a functionat >:( >:( >:(

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

Guest spider_bobi

pai da se salveaza conturile in scriptfiles , acuma depinde cum ai modul

se poate direct in scriptfiles

sau in alte directoare din scriptfiles...

fisierele conturilor sunt de format text

ok

dar nu am inteles ceva

tie nu ti se salveaza sau nu gasesti unde se salveaza ??

Link to comment
Share on other sites

Guest No_name

pai da se salveaza conturile in scriptfiles , acuma depinde cum ai modul

se poate direct in scriptfiles

sau in alte directoare din scriptfiles...

fisierele conturilor sunt de format text

ok

dar nu am inteles ceva

tie nu ti se salveaza sau nu gasesti unde se salveaza ??

Vad ca nu ai inteles

Exista includes si Fs-uri care salveaza datele

Directorul in care se salveaza date de obicei e scriptfiles in foldere de akolo.

Acum eu vreau un astfel de Fs sau include sau si mai bine cum sa introduc asta in GM-ul meu.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By seek nephrite
      CMD:stats(playerid, params[])
      {
          new Player;
          //--------------------------------------------------------------------------
          if(sscanf(params, "u", Player))
          return SendUsage(playerid, "/stats [Player ID]");
          if(!IsPlayerConnected(Player)) return SendError(playerid, "Player not connected!");
          if(IsPlayerConnected(Player))
          {
              ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "{FFFFFF}Account Informations", ShowStats(Player), "Close", "");
          }
          return 1;
      }
      cand dau /stats [id] isi ia freeze server-ul
      "ShowStats(Player)" e o functie care arata statisticile jucatorului respectiv
    • By khain.dev
      Buna! Probabil ca fiecare a intilnit problema cu salvarea coordonatelor a camerei,pai uite ca datorita acestei comenzi,usor si repede salvati coordonatele.
      - Cum lucreaza comanda?
      - Usor, intri pe server,te apropii in locul unde doresti  ca exemplu sa apara jucatorul pentru a alege skinul,scrii comanda /scamera si coordonatele se salveaza in scriptfiles.
       
      CMD:scamera(playerid, params[]) { static const fmt_str0[] = "SetPlayerCameraPos(playerid, %f, %f, %f);\n", fmt_str1[] = "SetPlayerCameraLookAt(playerid, %f, %f, %f);\n"; const fmt_size0 = sizeof(fmt_str0) + (-2 + 11) * 3, fmt_size1 = sizeof(fmt_str1) + (-2 + 11) * 3; #if fmt_size0 > fmt_size1 #define final_size fmt_size0 #else #define final_size fmt_size1 #endif new str[final_size], File: cam_file = fopen("coordonate.ini", io_append), Float: cam_pos_axis_x, Float: cam_pos_axis_y, Float: cam_pos_axis_z, Float: cam_pos_vec_axis_x, Float: cam_pos_vec_axis_y, Float: cam_pos_vec_axis_z; #undef final_size GetPlayerCameraPos(playerid, cam_pos_axis_x, cam_pos_axis_y, cam_pos_axis_z); GetPlayerCameraFrontVector(playerid, cam_pos_vec_axis_x, cam_pos_vec_axis_y, cam_pos_vec_axis_z); format(str, sizeof(str), fmt_str0, cam_pos_axis_x, cam_pos_axis_y, cam_pos_axis_z); fwrite(cam_file, str); format(str, sizeof(str), fmt_str1, cam_pos_axis_x + 5.0 * cam_pos_vec_axis_x, cam_pos_axis_y + 5.0 * cam_pos_vec_axis_y, cam_pos_axis_z + 5.0 * cam_pos_vec_axis_z); fwrite(cam_file, str); return fclose(cam_file); } Va multumesc,si sper ca va fi de folos!?
    • By Jiust
      Cand dau /save imi zice asa  i can't open the savedposition.txt for append, ajutati-ma!!!!!!!
    • By k1ll3rhawk
      Salut, am nevoie sa stiu cum fac ca in baza de date, la users, la fiecare user sa fie creat o noua linie, spre exemplu cum e level sau money sa am alta linie pentru un numar cum ar fi credit la telefon, cum fac sa adaug aceasta linie in baza de date din gm?
    • By Marius Adrian Mihaila
      Salut 
      Care ma poate ajuta si pe mine sa adaug la comanda /stats , bizz , house , si cate masini am ex: 7/10 si sa le pun pe ultimul rand si sa put toate spin Points/roll/gift etc intro categorie . 
      function ShowStats(playerid,targetid) {
          if(!IsPlayerConnected(playerid) || !IsPlayerConnected(targetid)) return true;
          new
              string[500],
              atext[20],
              ttext[180],
              rtext[180],
              jtext[100],
              drank[20],
              vtext[20],
              playersip[180],
              radios[64],
          
              drugs = PlayerInfo[targetid][pDrugs],
              mats = PlayerInfo[targetid][pMats],
              level = PlayerInfo[targetid][pLevel],
              exp = PlayerInfo[targetid][pExp],
              nxtlevel = PlayerInfo[targetid][pLevel],
              expamount,
              costlevel,
              pnumber = PlayerInfo[targetid][pPhone],
              rob = PlayerInfo[targetid][pRob],    
              warn = PlayerInfo[targetid][pWarns],
              clan = PlayerInfo[targetid][pClan];
          if(PlayerInfo[targetid][pMember] == 0) ttext = "None";
          else format(ttext, sizeof(ttext), "%s (rank %d)", FactionName(PlayerInfo[targetid][pMember]), PlayerInfo[targetid][pRank]);
          
          if(PlayerInfo[targetid][pSex] == 1) atext = "Male"; 
          else if(PlayerInfo[targetid][pSex] == 2) atext = "Female"; 
          
          if(PlayerInfo[targetid][pRank] != 0) format(rtext, 256, GetRankName(targetid));
          else rtext = "-";
         
          if(PlayerInfo[targetid][pJob] == 0) jtext = "None";
          else format(jtext, sizeof(jtext), "%s", JobInfo[PlayerInfo[targetid][pJob]][jName]);
          
          if(PlayerInfo[targetid][pPremiumAccount] == 0) { drank = "No"; }
          else if(PlayerInfo[targetid][pPremiumAccount] == 1) { drank = "Yes"; }
          else { drank = "Nu"; }
          if(PlayerInfo[targetid][pVip] == 0) { vtext = "No"; }
          else if(PlayerInfo[targetid][pVip] == 1) { vtext = "Yes"; }
          
          expamount = nxtlevel*levelexp;
          costlevel = nxtlevel*levelcost;
          if(WTChannel[playerid] == 0) radios = "Disabled";
          else format(radios, sizeof(radios), "#%d khz", WTChannel[playerid]);
          format(string, sizeof(string), "General:{ffffff} Total hours %0.2f | Warns: %d/3 | Money: $%s | Bank: $%s | Phone: %d", PlayerInfo[targetid][pConnectTime], warn, GetCashStr(targetid), GetBankMoney(targetid), pnumber);
          SCM(playerid, COLOR_LIGHTBLUE,string);
          format(string, sizeof(string), "Account:{ffffff} Level: %d | Respect Points: %d/%d | Next level: $%s | Premium Account: %s | Vip Account: %s | Premium Points: %d", level,exp,expamount,FormatNumber(costlevel),drank,vtext,PlayerInfo[targetid][pPremiumPoints]);
          SCM(playerid, COLOR_LIGHTBLUE,string);
          format(string, sizeof(string), "Player:{ffffff} Crimes: %d | Drugs: %d | Mats: %d | Freq: %s | Rob: %d/10 | Escape: %d/20 | CPoints: %s | GiftPoints: %d/200 | Spin: %d/200 ",  PlayerInfo[targetid][pCrimes], drugs,mats,radios,rob,PlayerInfo[targetid][pEscapePoints], FormatNumber(PlayerInfo[targetid][pCPoints]), PlayerInfo[targetid][pGiftPoints], PlayerInfo[targetid][pSpinPoints]);
          SCM(playerid, COLOR_LIGHTBLUE,string);
          format(string, sizeof(string), "Points:{ffffff} Roll: %d/200",  PlayerInfo[targetid][pRollPoints]);
          SCM(playerid, COLOR_LIGHTBLUE,string);
          format(string, sizeof(string), "Other:{ffffff} Faction: %s | Faction Warns: %d/3 | Faction Punish: %d/30 | Referral: %d", ttext,PlayerInfo[targetid][pFACWarns], PlayerInfo[targetid][pFpunish], PlayerInfo[targetid][pSQLID]);
          SCM(playerid, COLOR_LIGHTBLUE,string);
          if(clan != 0) {
              if(PlayerInfo[targetid][pClanRank] < 6) format(string, sizeof(string), "Clan:{ffffff} Clan: %s (%d) | Tag: %s | Rank: %d | Clan Warns: %d/3", ClanInfo[clan][clName], clan, ClanInfo[clan][clTag], PlayerInfo[targetid][pClanRank], PlayerInfo[targetid][pClanWarn]);
              else format(string, sizeof(string), "Clan:{ffffff} Clan: %s (%d) | Tag: %s | Rank: %d | Clan Warns: %d/3 | Clan Days: %d", ClanInfo[clan][clName], clan, ClanInfo[clan][clTag], PlayerInfo[targetid][pClanRank], PlayerInfo[targetid][pClanWarn], ClanInfo[clan][clDays]);                        
              SCM(playerid, COLOR_LIGHTBLUE, string);
          }
          if(PlayerInfo[targetid][pAdmin] != 0) {
              format(string, sizeof(string), "AW: %d/3", PlayerInfo[targetid][pAW]);    
          }        
          if(PlayerInfo[targetid][pHelper] != 0) {
              format(string, sizeof(string), "HW: %d/3", PlayerInfo[targetid][pHW]);    
          }        
          if(PlayerInfo[targetid][pLeader] != 0) {
              format(string, sizeof(string), "LW: %d/3", PlayerInfo[targetid][pLW]);
          }        
          
          if(PlayerInfo[targetid][pAdmin] >= 1) {
              GetPlayerIp(targetid,playersip,sizeof(playersip));
              format(string, sizeof(string), "Seconds: %.0f | AFK: %d | Interior ID: %d | Virtual World: %d | SQLID: %d | %s",PlayerInfo[targetid][pSeconds],AFKSeconds[targetid],GetPlayerInterior(targetid),GetPlayerVirtualWorld(targetid),PlayerInfo[targetid][pSQLID], string);
              SCM(playerid, COLOR_LIGHTRED,string);
          }
          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.