23.07.2012, 12:17
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.
helper will be appreciated and will be rep+1
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;
}