How do I do this?
#1

Well, I created a new faction on my cops and robbers gamemode. Everything was good and it compiled without any warnings or errors. My faction name is NironB, Now I want to know how to I save the permissions on the user file.
When I have CIA stats, ON player file it shows CIA=1337, Like that I need it for this. When I give someone this faction stats it should save on the user data like NironB=1337.

Hope someone would help me!
Thanks.
Reply
#2

Reply
#3

No code =================== No help.
Reply
#4

Well, Seems none understood that first post. I'll explain it clearly now..
I have my server installed with SFCRRPG gamemode. A modified one. As you might know, That gamemode has 2 factions namely CIA and Army. When I give someone CIA stats, It will save the CIA stats on his user file. (Playername.dudb file)
Sample userfile :
Код:
password_hash=74777030
Money=7500
Bankcash=5000
Score=-6
Adminlevel=1337
Nameban=0
Army=1337
CIA=1337 ( When I give someone CIA stats, It's automatically saved here )
RegularPlayer=0
Now, I have created a new faction on this gamemode. But, I have to save the stats of it in this user file. But how?
Example : ** On user file it should be added like this **
Код:
password_hash=74777030
Money=7500
Bankcash=5000
Score=6
Adminlevel=1337
Nameban=0
Army=1337
HERE(FactionName)=1337 ( I want that new faction stats saved here )
CIA=1337
RegularPlayer=0
I hope you understood it now. Help me now!
Reply
#5

What does the 1337 next to CIA mean? A rank?
Reply
#6

Are you using SII to save INI?
Reply
#7

Quote:
Originally Posted by HK
Посмотреть сообщение
Are you using SII to save INI?
Looks like he uses dudb, so I guess INI
Reply
#8

Quote:
Originally Posted by iDuckling
Посмотреть сообщение
What does the 1337 next to CIA mean? A rank?
Its the rank.

Quote:
Originally Posted by HK
Посмотреть сообщение
Are you using SII to save INI?
To save the ranks, It uses this format
pawn Код:
dUserSetINT(PlayerName(playerid)).("CIA",CanUseCIA[playerid]);
yeah, I use .dudb
Reply
#9

Then you need one that writes the rank when registering and one loading on login
Reply
#10

When a new player registers,
pawn Код:
if (udb_Create(PlayerName(playerid),inputtext))
BLA BLA BLA BLA All the code goes and in the middle my code is entered.
        dUserSetINT(PlayerName(playerid)).("NironB",0);
When an old player logins
pawn Код:
if(PLAYERLIST_authed[playerid] == 1)
BLA BLA BLA BLA All the code goes and in the middle my code is entered.
dUserSetINT(PlayerName(playerid)).("NironB",CanUseNironB[playerid]);
Still it doesn't save the stats on my .dudb file.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)