Transfering From SendClientMessage To Dialog
#1

i need this to be dialog
pawn Код:
dcmd_level(playerid,params[])
{
    if(AccInfo[playerid][Level] >= 1)
    {
        if(!strlen(params))
        {
        SendClientMessage(playerid, yellow, "Usage: /level [1/2/3/4/5]");
        return SendClientMessage(playerid, orange, "Function: Will see commands of specified level");
        }
        //======================================================================
        // Level 1
        //======================================================================
        if(strcmp(params,"1",true) == 0)
        {
        if(AccInfo[playerid][Level] >= 1)
        {
        SendClientMessage(playerid, white, "___________ |- Trial Moderator (Level 1) -| ___________");
        SendClientMessage(playerid,0x53D212FF,"Player: getinfo, weaps, ping, ip, ");
        SendClientMessage(playerid,0x33F666FF,"Vehicle: fix, repair, addnos, tcar");
        SendClientMessage(playerid,0x53D212FF,"Tele: saveplacae, gotoplace");
        SendClientMessage(playerid,0x33F666FF,"Adm: saveskin, useskin, dontuseskin, setmytime, adminarea");
        SendClientMessage(playerid,0x53D212FF,"Other: lconfig, morning, reports, richlist, miniguns");
        }
            else return ErrorMessages(playerid, 8);
        }
        //======================================================================
        // Level 2
        //======================================================================
        else if(strcmp(params,"2",true) == 0)
        {
        if(AccInfo[playerid][Level] >= 2)
        {
        SendClientMessage(playerid, white, "___________ |- Moderator (Level 2) -| ___________");
        SendClientMessage(playerid, orange, "+ Level 1 commands.");
        SendClientMessage(playerid,0x53D212FF,"Player: giveweapon, setcolour, burn, spawn, disarm, highlight, jetpack, flip, fu");
        SendClientMessage(playerid,0x33F666FF,"Player: warn, slap, (un)mute, laston, lspec, lspecoff");
        SendClientMessage(playerid,0x53D212FF,"Vehicle: acar, abike, aheli, aboat, aplane, lspecvehicle");
        SendClientMessage(playerid,0x33F666FF,"Tele: goto, vgoto, lgoto");
        SendClientMessage(playerid,0x53D212FF,"Adm: lmenu, clearchat, write, announce, announce2, screen, (un)lockcar");
        SendClientMessage(playerid,0x33F666FF,"Other: wanted, jailed, frozen, muted, fstyles");
        }
            else return ErrorMessages(playerid, 7);
        }
        //======================================================================
        // Level 3
        //======================================================================
        else if(strcmp(params,"3",true) == 0)
        {
        if(AccInfo[playerid][Level] >= 3)
        {
        SendClientMessage(playerid, white, "___________ |- Junior Administrator (Level 3) -| ___________");
        SendClientMessage(playerid, orange, "+ Level 1 and 2 commands.");
        SendClientMessage(playerid,0x53D212FF,"Set: set(health/armour/cash/score/skin/wanted/name/weather/time/world/interior/ping/gravity)");
        SendClientMessage(playerid,0x33F666FF,"All: setallskin, armourall, setallskin, setallwanted, setallweather, setalltime, setallworld");
        SendClientMessage(playerid,0x53D212FF,"All: setallscore, setallcash, giveallcash, giveallweapon, clearallchat, healall, disablechat");
        SendClientMessage(playerid,0x33F666FF,"Player: ubound, duel, akill, aka, caps,(un)freeze, kick, explode,(un)jail, force, eject, (s)removecash");
        SendClientMessage(playerid,0x53D212FF,"Vehicle: car, carhealth, carcolour, destroycar, vget, givecar");
        SendClientMessage(playerid,0x33F666FF,"Tele: teleplayer, gethere, get, move, moveplayer");
        SendClientMessage(playerid,0x53D212FF,"Other: gps, setpass, lammo, countdown, aweaps, invisible, visible");
        }
            else return ErrorMessages(playerid, 6);
        }
        //======================================================================
        // Level 4
        //======================================================================
        else if(strcmp(params,"4",true) == 0)
        {
        if(AccInfo[playerid][Level] >= 4)
        {
        SendClientMessage(playerid, white, "___________ |- Administrator (Level 4) -| ___________");
        SendClientMessage(playerid, orange, "+ Level 1,2 and 3 commands.");
        SendClientMessage(playerid,0x53D212FF,"All: spawnall, muteall, unmuteall, getall, killall, freezeall, unfreezeall");
        SendClientMessage(playerid,0x33F666FF,"All: kickall, slapalll, explodeall, disarmall, ejectall");
        SendClientMessage(playerid,0x53D212FF,"Player: cage, ban, rban, tempban, settemplevel, crash");
        SendClientMessage(playerid,0x33F666FF,"Adm: ctele, lockserver, enable, disable, spam, god, godcar, botcheck, forbidname, forbidword, fakedeath");
        SendClientMessage(playerid,0x53D212FF,"Other: uconfig, die, hide, unhide");
        }
            else return ErrorMessages(playerid, 5);
        }
        //======================================================================
        // Level 5
        //======================================================================
        else if(strcmp(params,"5",true) == 0)
        {
        if(AccInfo[playerid][Level] >= 5)
        {
        SendClientMessage(playerid, white, "___________ |- Head Administrator (Level 5) -| ___________");
        SendClientMessage(playerid, orange, "+ Level 1,2,3 and 4 commands.");
        SendClientMessage(playerid, orange, "+ Level 5 is Immune for all commands");
        SendClientMessage(playerid,0x53D212FF,"Player: setlevel, fakechat, fakedeath, fakecmd");
        SendClientMessage(playerid,0x33F666FF,"Adm: god, sgod, console");
        SendClientMessage(playerid,0x53D212FF,"Other: pickup, object, respawncars");
        SendClientMessage(playerid,0x53D212FF,"Rcon: lrcon (Only Rcon Admins) (Use: /rcon lrcon)");
        }
            else return ErrorMessages(playerid, 9);
        }
        //======================================================================
        else
        {
        SendClientMessage(playerid, red, "ERROR: Invalid Level! (1-5)");
        }
        return 1;
    }
    else return ErrorMessages(playerid, 1);
}
and this too
pawn Код:
dcmd_admins(playerid,params[])
{
    #pragma unused params
        new count = 0;
        new string[128];
        SendClientMessage(playerid, green, " ");
        SendClientMessage(playerid, green, "___________ |- Online Admins -| ___________");
        SendClientMessage(playerid, green, " ");
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        if (IsPlayerConnected(i))
        {
        if(AccInfo[i][Level] >= 1 && AccInfo[i][Hide] == 0)
        {
        if(AccInfo[i][Level] > 5) {
        AdmRank = "Community Owner";
        }
        if(IsPlayerAdmin(i)) AdmRank = "RCON Administrator";
        else
        switch(AccInfo[i][Level])
        {
        case 1: AdmRank = "Trial Moderator";
        case 2: AdmRank = "Moderator";
        case 3: AdmRank = "Junior Administrator";
        case 4: AdmRank = "Administrator";
        case 5: AdmRank = "Head Administrator";
        }
        format(string, 128, "%s (Id:%i) | Level: %d - %s",PlayerName2(i),i,AccInfo[i][Level], AdmRank);
        SendClientMessage(playerid, yellow, string);
        count++;
        }
        }
        }
        if (count == 0)
        SendClientMessage(playerid,red,"No admin online in the list");
        SendClientMessage(playerid, green, " _______________________________________");
        return 1;
}
Remove the
Код:
___________________________
Reply


Messages In This Thread
Transfering From SendClientMessage To Dialog - by Team_PRO - 13.06.2014, 09:39
Re: Transfering From SendClientMessage To Dialog - by [Cali]ChrOnic_T - 13.06.2014, 09:47
Re: Transfering From SendClientMessage To Dialog - by MacT - 13.06.2014, 09:57
Re: Transfering From SendClientMessage To Dialog - by Threshold - 14.06.2014, 04:28

Forum Jump:


Users browsing this thread: 1 Guest(s)