MultiCharacter System
#1

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!
Reply
#2

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).
Reply
#3

Can you give me an Example please? Example for like Faction ID for Player 1 and 2.
Thanks
Reply
#4

Bump
Reply
#5

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!
Reply
#6

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.
Reply
#7

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
Reply
#8

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.
Reply
#9

Hm...useful,I'll try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)