Help Me with my Clan System
#1

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):

pawn Код:
#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,Green,pS[String]);
            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;
            RespawnPlayer(playerid);
            pS[ClanRequest] = Negative;
            ClanInfo[pS[Clan]][fMembers]++;
            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
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)