How to change ingame user data y_ini
#1

Hello, i have a problem, well not really a problem just don't know how to actually start doing it. I have a pUrzednik (Urzednik is just the fraction like LSPD...) in my enum pInfo collum and i would like this fraction to give out licenses like motorbike license and driving license, and i need at least this one to be helped with otherwise i won't work it out and give up lol. So far what i wrote yesterday night (5,30A.M) is this.. :

Код:
CMD:dajkartemotorowerowa(playerid, params[])
{
	if(IsPlayerInRangeOfPoint(playerid, 2.0, 251.69999694824, 73.599998474121, 1004.2002563477) && (PlayerInfo[playerid][pUrzednik] <= 1))
{
new
    INI:ini = INI_Open("Accounts.ini");
INI_WriteString(ini, "KartaMotorowerowa", "1");
INI_Close(ini);
	return 1;
}
}
Then i realised it has no "targetid" so it will do it to his self only! Not only that i realised the "Accounts" is only a folder and in the folder Player_name so for e.g. Bob_Smith I did try "Using ******" but not that much info, well not on my scripting level anyway.
Would be greatful if someone could help me, and even more if i had a way of contacting someone if i need help as im a BEGGINER, so don't spam stuff like i can see its a newbie script because i know that!

Thanks in advance!

Edit----
( Pretty much i want to open players file .ini and edit this line "KartaMotorowerowa 0" to "KartaMotorowerowa 1")
Sorry if i didnt write id clear..
Reply
#2

Help yourself with this systems:
https://sampforum.blast.hk/showthread.php?tid=273088

https://sampforum.blast.hk/showthread.php?tid=269361
Reply
#3

So i use "Accounts/%s.ini" no "Accounts.ini" correct me if im wrong, and if yeah, i never used targetid not sure how to create the script and when i look at some made in zcmd i get confused ;/

And cheers for replying, appreciate it.
Reply
#4

as in when i created this "stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
format(string,sizeof(string),PATH,playername);
return string;
}"
Reply
#5

look im using one of those systems and are working perfectly
Reply
#6

Ok, i kinda get it but really not sure about the targetid when i tried using it it said it unknown
Reply
#7

I don't know im not a pro
Reply
#8

Yes, i understand the userpath now, however do you know any targetid examples? just so that i get an idea
@ edit oh sorry, ok thankss anyway +rep anyway did help me alot
Reply
#9

here this might help

https://sampforum.blast.hk/showthread.php?tid=291765
Reply
#10

So did it help?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)