SA-MP Forums Archive
Make INI and then read from it - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Make INI and then read from it (/showthread.php?tid=90326)



Make INI and then read from it - Blades - 07.08.2009

Hi, I would like to know how can i make an ini file with information in it, and then read it?
I need this for a job script.

pawn Код:
if(strcmp(cmd, "/duty", true) == 0)
        {
        format(string, sizeof(string), "You are now on duty as a cop, %s", name);
        SendClientMessage(playerid, COLOR_GREEN, string);
        Job4[playerid] = 1;
        return 1;
        }
So i want this command executed only if you have your name written in the Ini file, But first how do i make the ini file?

Thanks in advance, and sorry as this question might seem nooby, as i tried searching and found nothing.


Re: Make INI and then read from it - saiberfun - 07.08.2009

https://sampwiki.blast.hk/wiki/File_Functions


i dunno so much about files tho but this should help you try around a bit^^


Re: Make INI and then read from it - Blades - 07.08.2009

Quote:
Originally Posted by saiberfun
https://sampwiki.blast.hk/wiki/File_Functions


i dunno so much about files tho but this should help you try around a bit^^
Thanks for the help, but i didn't understand much from that link, I will still try until i get another answer that might help me.
Can anyone just help me out and tell me how to make an ini or txt and then read from it so i can use it in an If statement or something?