02.10.2011, 13:36
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;
}