SA-MP Forums Archive
Problem with the clan system - 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: Problem with the clan system (/showthread.php?tid=335010)



Problem with the clan system - davidman2 - 16.04.2012

i got a clan system evrey thing work but when i create a clan its closed the samp serveri know the source of this problem but i dont know how to fix it
PHP код:
if(!strcmp(clan_string"create"true)) {
            
clan_string strtok(cmdtextidx);
            
format(CFilesizeof CFile"Clans/%s.txt",clan_string);
            if(!
strlen(clan_string)) return SendClientMessage(playeridred"USAGE /clan create [name] ");
            if(
dini_Isset(Name,"Clan")) return SendClientMessage(playeridred".You allready in clan");
            if(
dini_Exists(CFile)) return SendClientMessage(playeridred".That clan allready exist");
            
// clan file
            
dini_Create(CFile);
            
dini_Set(CFile,"// --- INFO ---","");
            
dini_Set(CFile,"Clan",clan_string);
            
dini_Set(CFile,"Leader",Name);
            
dini_IntSet(CFile,"ClanPlayers",1);
            
dini_IntSet(CFile,"ClanCash",0);
            
getdate(yearmonthday);
            
format(CDatesizeof CDate"%d/%d/%d",day,month,year);
            
dini_Set(CFile"ClanDate",CDate);
            
dini_Set(CFile,"// --- MEMBERS ---","");
            
dini_Set(CFile,Name,"ClanPlayer");
            
dini_Set(CFile,"// --- CLAN SYSTEM >> Created By 'BaNd'","");
            
// player clan
            
dini_Set(Name,"// --- CINFO ---","");
            
dini_Set(Name,"Clan",clan_string);
            
dini_IntSet(Name,"ClanLvl",4);
            
dini_IntSet(Name,"ClanLeader",1);
               
format(stringsizeof(string), ".you Created a Clan Names ''%s'' ",clan_string);
            
SendClientMessage(playeridgreenstring);
            
SendClientMessage(playeridgreen"to Edit Something Use /edit [command] ");
            return 
1;
         } 
You See the dini_Create(CFile); its the problem but when i delet this i cant create a clan why please help me


Re: Problem with the clan system - MadeMan - 16.04.2012

Do you have a folder called 'Clans' in 'scriptfiles' ? If not, create it.


Re: Problem with the clan system - Or@Kul - 17.04.2012

Like "MadeMan" said you need a 'Clans' forlder in scriptfiles to save your information about you clans


Re: Problem with the clan system - davidman2 - 17.04.2012

Ok I Need just to open it and thats it


Re: Problem with the clan system - sami21 - 05.11.2012

Do you have a folder called Clans in scriptfiles ?