Adding extra line to INI after player's registering
#1

So My current infos saved when the player register
Код:
new INI:File = INI_Open(UserPath(playerid));
                WP_Hash(buf, sizeof(buf), inputtext);
                INI_SetTag(File,"data");
                INI_WriteString(File, "pPassword", buf);
		INI_WriteInt(File,"pKills",0);
		INI_WriteInt(File,"pDeaths",0);
                INI_Close(File);
Now, Lets say I want to add [pBans] to a player who's already registered, How could I do this ? :/
Reply
#2

I think you can't just because that function has never been implemented. If it's possibile, well you'll probably have to waste your time. Or you can always make a command that allows you to ban offline players.
Reply
#3

ban the player is not enough, If he evades he can still use the account, I can simply block the account and if he wanted to evade he can go ahead with new name.

Anyways, I need a way to add it :/
Reply
#4

Take a look.

https://sampforum.blast.hk/showthread.php?tid=401701
Reply
#5

you can fremove(UserPath(playerid)); and re-created !
Reply
#6

Quote:
Originally Posted by shocktheripper
Посмотреть сообщение
Dude, I don't want a custom ban system, I want to add an extra line to players who are already registered!

Quote:
Originally Posted by M0HAMMAD
Посмотреть сообщение
you can fremove(UserPath(playerid)); and re-created !
I'm quite sure there is an easier way to do that :/
Reply
#7

best bet is not to use INI for registration and user system
"The INI file format is an informal standard for configuration files for some platforms or software"
my advice is to switch to sqlite or mysql.


now to try and answer your question despite my opinion.. lol

have you tried just writing the var to the file?
you may have to write a script that will loop threw every user file and add the field, should be simple.
if you need help with that part we will need you to post the UserPath function your using.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)