MultiCharacter System - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MultiCharacter System (
/showthread.php?tid=516406)
MultiCharacter System -
JonathanW - 31.05.2014
Hello there.I've seen Multi Character system in many servers,..you can Create and Switch characters In Game.I can script and all that stuff,but the only thing I don't know is 'How to set & save Player's Info'.
Like,
PlayerInfo[playerid2]?? Seems strange
PlayerInfo2[playerid] Even Strange
Ed Cetera
Can anyone explain that to me below?
Thanks!
Re: MultiCharacter System -
DiGiTaL_AnGeL - 31.05.2014
PlayerInfo2[playerid][etc] seems good, but you should use tags in your ini files to separe the first character from the second one(2 characters in 1 file).
Re: MultiCharacter System -
JonathanW - 31.05.2014
Can you give me an Example please? Example for like Faction ID for Player 1 and 2.
Thanks
Re: MultiCharacter System -
JonathanW - 31.05.2014
Bump
Re: MultiCharacter System -
SilentSoul - 31.05.2014
PlayerInfo[playerid2] is an
enum,
Quote:
Enumerations are a very useful system for representing large groups of data and modifying constants quickly. There are a few main uses - replacing large sets of define statements, symbolically representing array slots (these are actually the same thing but they look different) and creating new tags.
|
Btw, if you would like to learn how to load/save using enumerations
Check this tutorial will help you understanding some useful functions!
Re: MultiCharacter System -
JonathanW - 31.05.2014
I know what enums are,what I basically want is,that 'How to save Multi character Info'.Creation of Characters In Game,and all that stuff.
Re: MultiCharacter System -
Calgon - 31.05.2014
It's quite a simple thing to make - the way these systems typically work is by having a master account and character accounts.
If you're using some sort of SQL solution: Master accounts require a username and password and a primary key ID, then your character accounts can be linked by using the ID of the master account.
I believe it has been demonstrated in this script here:
https://sampforum.blast.hk/showthread.php?tid=291035
Re: MultiCharacter System -
eXeDev - 31.05.2014
Quote:
Originally Posted by Calgon
If you're using some sort of SQL solution: Master accounts require a username and password and a primary key ID, then your character accounts can be linked by using the ID of the master account.
|
Exactly this.
Re: MultiCharacter System -
JonathanW - 31.05.2014
Hm...useful,I'll try this.