Problem with the clan system
#1

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
Reply
#2

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

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

Ok I Need just to open it and thats it
Reply
#5

Do you have a folder called Clans in scriptfiles ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)