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


Messages In This Thread
A little help! - by LaGrande - 23.07.2012, 12:17
Re: A little help! - by Cjgogo - 23.07.2012, 12:46
Re: A little help! - by LaGrande - 23.07.2012, 14:24
Re: A little help! - by LaGrande - 25.07.2012, 08:21

Forum Jump:


Users browsing this thread: 1 Guest(s)