Jump to content

Cerere tutorial


SebyGTA

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.