SA-MP Forums Archive
Tutorial Please? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Tutorial Please? (/showthread.php?tid=287236)



Tutorial Please? - seanny - 02.10.2011

Hello, I need a tutorial on how to make an Admin System with DCMD and Y_INI

like
/kick id reason
/ban id reason
/banip ip
/vehicle id color1 color 2
/makeadmin id level

Thanks


Re: Tutorial Please? - Pharrel - 02.10.2011

search...


Re: Tutorial Please? - seanny - 02.10.2011

I did and All I found was ones in ZCMD and using Dini, So you search!


Re: Tutorial Please? - Pharrel - 02.10.2011

the 'complex' part about ZCMD and DCMD is the SSCANF so if is about sscanf might help you...and find some other about Y_Ini


Re: Tutorial Please? - brett7 - 02.10.2011

First look for a tutorial making a registration system using yini then add an admin level vairable. Then to make the commands via dcmd is easy there are tutorial out there eg.
pawn Код:
dcmd_kick(playerid, params[])
{
    if(level[playerid] >= 1) {
    if (strlen(params))
    {
        new id;
        id = strval(params);
        new adminname[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, adminname, sizeof(adminname));
        GetPlayerName(id, playername, sizeof(playername));
        if (IsPlayerConnected(id))
        {
            new string2[256];
            GameTextForPlayer(id, " ~n~ ~n~ ~n~ ~g~ status: ~r~ kicked",99999999999,3);
            format(string2, 256, "Administrator %s has kicked %s for: %s", adminname, playername, params[1]);
            SendClientMessageToAll(orange, string2);
            Kick(id);
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Player is not connected");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "Usage: /kick [playerid] [reason]");
    }
    }
    return 1;
}



Re: Tutorial Please? - Zonoya - 02.10.2011

looooooool ur in luck i have a Y_INI and DCMD admin system but without /ban ip and /vehicle model col 1 col 2 but i can script them in


Re: Tutorial Please? - grand.Theft.Otto - 02.10.2011

https://sampwiki.blast.hk/wiki/Creating_...l_admin_script
https://sampwiki.blast.hk/wiki/Creating_...n_FilterScript
https://sampwiki.blast.hk/wiki/Creating_an_Admin_Script