Jump to content

Recommended Posts

Posted (edited)

Salut sa-mp.ro am un filescript de clanuri primit de la un pr ... problema e ca orice member poate sa isi faca clanul lui .... da eu as vrea sa pun o restrictie .... sa poata doar de la un anumit nivel ... gen 8-9 dar nu stiu cum .... 

CMD:createclan(playerid, params[])
{
    new i=1;
    while(i<maxclans)
    {
        new file2[512];
        format(file2, sizeof(file2),"Clans/%d.ini", i);
        if(!dini_Exists(file2))
        {
            PlayerInfo[playerid][pClan] = i;
            new name[MAX_PLAYER_NAME];
            GetPlayerName(playerid, name, sizeof(name));
            strmid(ClanInfo[PlayerInfo[playerid][pClan]][cLider], name, 0, strlen(name), 256);
            break;
        }
        else
        {
            i++;
        }

    }
    if(PlayerInfo[playerid][pCreateClan] == 0)
    {
        ShowPlayerDialog(playerid,10, DIALOG_STYLE_INPUT, "Create Clan", "Introdu numele clanului tau:", "Accept", "Cancel");
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Ai creeat deja un clan!");
    }
    return 1;
}

Edited by SebyGTA
Posted

Pentru inceput pune filterscriptul in GameMode,

Apoi folosesti aceasta resctrictie la comanda

if(PlayerInfo[playerid][pLevel]<8) return SendClientMessage(playerid,-1,"Ai nevoie de level 8");

 

  • Upvote 1

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.