12.08.2014, 15:30
Hello, I want to create few rcon commands, which I want to access through the console by rcon.
Any examples?
For example, I want to create command that promotes certain player to a certain Admin lvl. / VIP lvl.
Or a command that removes all nick/IP bans of a certain player by nick.
P.S.
For example, this is my current command for unban player.
I want to create an alternative rcon command like this, which I want to access from console.
Any examples?
For example, I want to create command that promotes certain player to a certain Admin lvl. / VIP lvl.
Or a command that removes all nick/IP bans of a certain player by nick.
P.S.
For example, this is my current command for unban player.
I want to create an alternative rcon command like this, which I want to access from console.
Код:
dcmd_unban(playerid, params[])
{
if(pInfo[playerid][Adminlevel] < 2) return SendClientMessage(playerid, COLOR_RED, "You have no righs!");
new target[30], user[128];
if(sscanf(params, "s[30]", target)) return SendClientMessage(playerid, COLOR_ORANGE, "Use: /unban [player nick]");
format(user, sizeof(user), "%s.ini", target);
if(INI_Exist(user))
{
new INI:File = INI_Open(user);
INI_SetTag(File,"Player's Data");
INI_WriteInt(File, "Banned", 0);
INI_Close(File);
SendClientMessage(playerid,COLOR_ORANGE,"You can use /rcon unbanip [IP of the player] too!");
}
else
{
SendClientMessage(playerid, COLOR_RED, "This player is not existing!");
return 1;
}
return 1;
}

