Jump to content

Recommended Posts

Posted

Nu inteleg de ce nu imi arata fiecare dialog. la admin 1 sa scriu /ah 1, la admin 2 sa scriu /ah 2 si tot asa

Ma puteti ajuta sa-l rezolv. daca scriu /ah (orice numar), imi apre admin 6 orice numar as pune 

 

CMD:ah(playerid, params[])
{
    if(IsPlayerConnected(playerid))
    {
        if(gPlayerLogged[playerid] == 0)
            return SCM(playerid, COLOR_LIGHTRED, "Nu esti logat!");

        if (PlayerInfo[playerid][pAdmin] >= 1)
        {
            static szContent[2048];
            szContent[0] = EOS;
            new level;
            if(sscanf(params, "u",level))
            {
                 SCM(playerid, COLOR_WHITE, "Tasteaza: /ah <1-7>");
                 return 1;
            }
            switch(PlayerInfo[playerid][pAdmin])
            {
                case 1:
                {
                    strcat(szContent, "Comenzi admin level 1 :\n");
                    strcat(szContent, "{FFFF00}Admin 1:{FFFFFF} /getcar, /dn, /kick, /warn, /mute, /check, /spawn, /clearchat(/cc), /goto\n");
                    strcat(szContent, "{FFFF00}Admin 1:{FFFFFF} /slap, /up, /down, /unmute, /managearea, /last, /fmembers, /goback, /a, /e, /l, /aduty, /nmute\n");
                    strcat(szContent, "{FFFF00}Admin 1:{FFFFFF} /specme /togfind, /disarm, /anno, /announce2, /aimtest, /freeze, /unfreeze, /ajailo, /ajail, /checkv, /setjob, /fastevent\n");
                }
                case 2:
                {
                    strcat(szContent, "Comenzi admin level 2 :\n");
                    strcat(szContent, "{FFFF00}Admin 2:{FFFFFF} /nos, /jetpack, /areagun, /areafreeze, /areaunfreeze, /areadisarm, /checkgun, /putplayerinvehicle, /fixveh\n");
                }
                case 3:
                {
                    strcat(szContent, "Comenzi admin level 3 :\n");
                    strcat(szContent, "{FFFF00}Admin 3:{FFFFFF} /managegotoevent /oldcar, /gotocar, /rac, /gotoin, /oplace, /doplace/managegotoevent /oldcar, /gotocar, /rac, /gotoin, /oplace, /doplace\n");
                }
                case 4:
                {
                    strcat(szContent, "Comenzi admin level 4 :\n");
                    strcat(szContent, "{FFFF00}Admin 4:{FFFFFF} /leaderwarn /removeleaderwarn /fuelcars /temporarskin /unbanip /auninvite /auninviteoff /givegun /setarmor\n");
                }
                case 5:
                {
                    strcat(szContent, "Comenzi admin level 5 :\n");
                    strcat(szContent, "{FFFF00}Admin 5:{FFFFFF} /giveallmoney, /unwarn, /hprice, /agl, /tod, /asellhouse, /asellbiz, /gotosac, /setskin\n");
                }
                case 6:
                {
                    strcat(szContent, "Comenzi admin level 6 :\n");
                    strcat(szContent, "{FFFF00}Admin 6:{FFFFFF} /acover2 /acover /acoveroff /vipname /removename /setpp, /kickall, /serverrestart, /togkickafk\n");
                    strcat(szContent, "{FFFF00}Admin 6:{FFFFFF} /serverpass, /servername, /resethelp, /changename /giftpremium /resetgift /giftbox\n");
                    strcat(szContent, "{FFFF00}Admin 6:{FFFFFF} /createhouse, /ban, /movehouse, /houseinterior, /banip, /gethere, /getip, /banipp, /unbanip, /unban, /banoff");
                }
                case 7:
                {
                    strcat(szContent, "Comenzi admin level 7 :\n");
                    strcat(szContent, "{FFFF00}Fondator:{FFFFFF} /setsupport, /removesupport, /removesupportoff, /setbeta, /removebeta, /removebetaoff, /givelevel, /setpp, /givehour, /sethour\n");
                    strcat(szContent, "{FFFF00}Fondator:{FFFFFF} /setpremium, /removepremium, /makeadmin, /makeadminoff, /giverp, /giveallpp, /setlevel, /money, /bank, /givemoney, /setppo, /kickall\n");
                    strcat(szContent, "{FFFF00}Fondator:{FFFFFF} /makehelper /makeleader, /auninvite, /auninviteoff\n");
                }
            }
            ShowPlayerDialog(playerid, DIALOG_AH, DIALOG_STYLE_MSGBOX, "Admin Help", szContent, "Close", "");
        }
    }
    return 1;
}

Posted

La sscanf la parametru ai folosit "u". Ăla se folosește doar pentru playerid în general.

Încearcă așa:

if(sscanf(params, "i",level))

Posted

In loc de  switch(PlayerInfo[playerid][pAdmin]) pui  switch(level)

 

1859311972_BANNER-GIREADAcopy-min.thumb.png.48e5e420ae2185dce5b244965a1d2601.png

 

Posted
Acum 16 ore, Onehitkill a spus:

Nu-mi apare nimic

 

Urmeaza ce zice @Gireada

Ce inseamna cuvantul "Unic" este atunci cand Chestia / Obiectul / Idea / etc... nu exista in alta parte.

Copii, nu mai veniti cu vorbe de "Am gamemode unic", nu exista asa ceva, la ora actuala totul este pe net.

Aveti grija pe cine ajutati, majoritatea sunt caini.

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.