SA-MP Forums Archive
How to change ingame user data y_ini - 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: How to change ingame user data y_ini (/showthread.php?tid=373495)



How to change ingame user data y_ini - MatZZPL - 30.08.2012

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


Re: How to change ingame user data y_ini - ThePrograme - 30.08.2012

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

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


Re: How to change ingame user data y_ini - MatZZPL - 30.08.2012

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.


Re: How to change ingame user data y_ini - MatZZPL - 30.08.2012

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;
}"


Re: How to change ingame user data y_ini - ThePrograme - 30.08.2012

look im using one of those systems and are working perfectly


Re: How to change ingame user data y_ini - MatZZPL - 30.08.2012

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


Re: How to change ingame user data y_ini - ThePrograme - 30.08.2012

I don't know im not a pro


Re: How to change ingame user data y_ini - MatZZPL - 30.08.2012

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


Re: How to change ingame user data y_ini - ThePrograme - 30.08.2012

here this might help

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


Re: How to change ingame user data y_ini - ThePrograme - 30.08.2012

So did it help?