View Full Version : Help Me with my Clan System

01/01/2012, 10:47 PM
I have this problem:

I invite somebody to a clan, he accept, but after new connect he is a normal player, i have this codes(tell me if i forgot something, like a define or idk):

#define Negative -1

if(dialogid == ClanDialog+8) // accept invitation
if(response == 1) // Yes
format(pS[String], 128, "Congratulations! Your now a member of: %s. You will now automaticaly spawn at the clan HQ",ClanInfo[pS[ClanRequest]][fName]);
SendClientMessage(playerid,White,"Short Clan Info: Usage /c [Text] to speak in your clanchat, When you use /clanskin you will be the skin that belongs to your rank.");
pS[Clan] = pS[ClanRequest];
pS[Rank] = ClanInfo[pS[ClanRequest]][fJoinRank];
pS[SpawnPoint] = ClanSpawn;
pS[ClanRequest] = Negative;
format(pS[String], 128, "[Clan Message] %s has just joined the faction.",pName(playerid));
SendMessageToClan(pS[Clan], pS[String]);
return 1;

About the ClanInfo, ClanRequest have no problem, but i dont understand this:

pS[Clan] = pS[ClanRequest];
pS[ClanRequest] = Negative;

And How to make a save system here, im using dini

01/01/2012, 10:53 PM
OnPlayerDisconnect add this.
dini_IntSet(file, "Member", ClanInfo[pS[Clan]][fMembers]);

This will work only if you fill all the necessary functions.

E: Show me your OnPlayerDisconnect