PDA

View Full Version : Tutorial Please?


seanny
02/10/2011, 01:27 PM
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 :)

Pharrel
02/10/2011, 01:28 PM
search...

seanny
02/10/2011, 01:32 PM
I did and All I found was ones in ZCMD and using Dini, So you search!

Pharrel
02/10/2011, 01:36 PM
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

brett7
02/10/2011, 01:36 PM
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.

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;
}

Zonoya
02/10/2011, 01:39 PM
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

grand.Theft.Otto
02/10/2011, 03:29 PM
http://wiki.sa-mp.com/wiki/Creating_a_normal_admin_script
http://wiki.sa-mp.com/wiki/Creating_A_Simple_Administration_FilterScript
http://wiki.sa-mp.com/wiki/Creating_an_Admin_Script