A little help! - 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)
+--- Thread: A little help! (
/showthread.php?tid=362107)
A little help! -
LaGrande - 23.07.2012
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
Re: A little help! -
Cjgogo - 23.07.2012
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.
Re: A little help! -
LaGrande - 23.07.2012
yeah, i tried all those but instead of saving 1=[Member Name] it was gay like either [member name] = None
Re: A little help! -
LaGrande - 25.07.2012
Bump