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
Код:
#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;
}