Make INI and then read from it
#1

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.
Reply
#2

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


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

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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)