SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/01/2012, 11:47 PM   #1
[FBI]M.Vulture[XAC]
Little Clucker
 
Join Date: Jul 2011
Posts: 28
Reputation: 0
Default Help Me with my Clan System

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 Code:
#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
[FBI]M.Vulture[XAC] is offline   Reply With Quote
Old 01/01/2012, 11:53 PM   #2
Bogdan1992
Huge Clucker
 
Bogdan1992's Avatar
 
Join Date: Dec 2011
Location: Romania
Posts: 264
Reputation: 21
Default Re: Help Me with my Clan System

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
Bogdan1992 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
clan system HELP Horrible Scripting Help 1 27/08/2011 03:55 AM
Clan System Nekrus2 Help Archive 1 12/09/2010 07:43 PM
Clan system?. Hottie Help Archive 3 27/07/2009 12:42 PM
clan system _ReloadeD_ Help Archive 5 23/06/2009 08:58 PM
[help]need clan system _RedBull_ Help Archive 1 10/06/2009 07:53 PM


All times are GMT. The time now is 07:42 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.