SA-MP Forums Archive
Command /clan - 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: Command /clan (/showthread.php?tid=369289)



Command /clan - toi - 16.08.2012

I wanted to know how to create a command / clan to avoid fake clan, possibly the command to write the names of the players in a text file in scriptfiles / users / .ini
How can I do?


Re: Command /clan - RanSEE - 16.08.2012

You can like define a clan and add and passcode or something ?

Код:
#define CLANTAG "[DZ]" // example
#define CLANPASSWORD "testpasscode" //Enter the clan password

It should be something like this


public OnPlayerConnect(playerid)
{
        new string[500];
        new nome[24];
        GetPlayerName(playerid, nome, 24);
        if(strfind(nome, CLANTAG, true) == 0)
        {
                format(string, sizeof(string), "{FFFFFF}Welcome%s!\nYou must confirm the clan password %s.\nEnter the clan password and confirm.", nome);
                ShowPlayerDialog(playerid, DIALOGCLAN, DIALOG_STYLE_INPUT, "Clan", string, "Confirm", "Exit");
        }
        else
        {
                SendClientMessage(playerid, DZ, "Welcome!");
        }
        return 1;
}
Hope you can do the rest.