A little help!
#1

well, i am trying to make a system when a player joins an Org, his name is added on the file.
The leader's name will be at the top of file. Which i have made already but now i am having problem with the members.
Once a new org is created, all the member spots from 1 to 10 are set to "None". but when a player joins his name is still None, i have the following function in my setmember command.

pawn Код:
stock setmember(playerid)
{
    new PlayerNam[MAX_PLAYER_NAME],str[128];
    format(str,sizeof(str),"Org/%d.txt",GetOrgID(PlayerOrg[playerid]));
    GetPlayerName(playerid,PlayerNam,MAX_PLAYER_NAME);
    if(strcmp("None", "None", true) == 0)// i'm new at this thing
    {
        new File:example = fopen(str, io_write);
        if(example)
        {
            fwrite(example, PlayerNam);
            fclose(example);
        }
    }
    return 1;
}
helper will be appreciated and will be rep+1
Reply
#2

Why won't you use one of the file-writing systems: YINI,MySQL.Look them up on ******,and read the tutorials,I use YINI,and is cool,it allows you to easily acces databases,but MySQL is slightly different and a bit more efficient because you can acces the databases from a site.
Reply
#3

yeah, i tried all those but instead of saving 1=[Member Name] it was gay like either [member name] = None
Reply
#4

Bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)