Peršokti į turinį
Negalima prašyti ar platinti betkokių žaidimą (multiplayer) palengvinančių programų ir scriptų! Kitaip bus taikoma 1.21. taisyklė

[C#] FiveM žaidėjų duomenų valdymas tarp resursų


Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 1212 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Recommended Posts

Sveiki. Ties FiveM serverių developmentu pradėjau dirbti maždaug prieš dvi savaites. C# ir pats FiveM yra man nauji, tai gal ko nepagaunu, nesuprantu, padėkite susidelioti viską suprantantys žmonės :D.

Apačioje prisegu žinutę su klausimu, visu paaiškinimu, kas, kur, kaip, kada and stuff. Ją vakar parašiau oficialame FiveM forume, bet nelabai ten kol kas linkę padėti žmonės, tai gal iš čia esančių kas nusimanys :D.

Dėkui iš anksto chebra!

Spoiler

Hello everyone. I have a question related to player data handling in server across resources, what would be the best way to implement this? I want to have access to each player data variable at (pretty much) any point in script. I thought I would make a separate class with fields like name, money, email, privileges, all that kind of stuff, then create an object for each player when he connects to the server and pass that object with data across the resources using events, but I discovered, that events don’t accept objects as parameters and that is very unfortunate :confused:. I tried to serialize and deserialize object using newtonsoft , but that is not an option because deserialized object looses reference to class with all the fields and I can’t access those anymore.

C# is new to me, as well as FiveM, I started learning those like 2 weeks ago. I genuinely have no idea at this point, how could I implement such a solution. Please share any ideas, thank you very much!

PS: I was developing a SA-MP server in the past, but first of all, I would write a script in one file with easy separation into several. I would create an array, where all player data would be stored, but that is completely different story from how C# and FiveM resources work. Just telling this, so if some of you have an idea of how Pawn in SA-MP works, would have an idea of what I’m trying to achieve in here.

English is my second language so if something is unclear, let me know, I will try my best to present my objective in another way. Thanks in advance everyone!

Redaguota , nario KasparasDope
Nuoroda į komentarą
Dalintis per kitą puslapį

Ši tema yra neaktyvi. Paskutinis pranešimas šioje temoje buvo prieš 1212 dienas (-ų). Patariame sukurti naują temą, o ne rašyti naują pranešimą.

Už neaktyvių temų prikėlimą galite sulaukti įspėjimo ir pranešimo pašalinimo!

Prisijungti prie diskusijos

Palikti atsakymą galite iš karto, o užsiregistruoti vėliau. Jeigu jau turite paskyrą mūsų forume, Prisijunkite.

Svečias
Atsakyti šioje temoje...

×   Įklijuotas tekstas turi teksto formatavimą.   Pašalinti teksto formatavimą

  Galimi tik 75 veidukai.

×   Nuoroda buvo automatiškai įterpta.   Įterpti nuorodą paprastai

×   Jūsų ankstesnis pranešimas buvo atkurtas.   Išvalyti redaktorių

×   Jūs negalite įkelti nuotraukas tiesiogiai.Įkelkite arba įdėkite nuotraukas iš URL.

  • Šiame puslapyje naršo:   0 nariai

    • Nėra registruotų narių peržiūrinčių šį forumą.

Skelbimai


×
×
  • Sukurti naują...