/ban and /unban
#1

Hello,

Is it possible to use Rcon command ban and unban without logging into Rcon to ban someone? If yes, Can someone make a /ban and I'll make the unban xD

Like:
/ban [id] [reason]
/unban [id]


Thanks.
Reply
#2

https://sampwiki.blast.hk/wiki/SendRconCommand
Reply
#3

No that is not possible i think.
Reply
#4

So can you make me a /ban command to ban someone using Y_INI? thanks.
Reply
#5

pawn Код:
CMD:reconnect(playerid, params[])
{
        new targetid;
        if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE,"Usage:/Reconnect [playerid]");
        new string[16 + 6],destid = targetid,ipstring[16];
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, " Error:Player Is Not Connected!");
        GetPlayerIp(destid, ipstring, 16), SetPVarString(destid, "pIp", ipstring);
        format(string, sizeof(string), "banip %s",ipstring);
        SendRconCommand(string);
        PlayerReconnecting[destid]=1;
        new string1[8+16];
        GetPVarString(playerid, "pIp", string, 16);
        format(string1, sizeof(string1), "unbanip %s", string1);
        SendRconCommand(string1);
        return SendClientMessage(destid, COLOR_WHITE, "Reconnecting...");
}
see how to ban and unban a player
Reply
#6

LOL, Reconnect?
Reply
#7

From that u didnt understand a thing for u as u above they just formatted a string to ban or unban a player but since u not intellectually stable to look above the matter ill show u
Reply
#8

pawn Код:
CMD:ban(playerid, params[])
{
        new targetid;
        if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE,"Usage:/Reconnect [playerid]");
        new string[16 + 6],destid = targetid,ipstring[16];
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, " Error:Player Is Not Connected!");
        GetPlayerIp(destid, ipstring, 16), SetPVarString(destid, "pIp", ipstring);
        format(string, sizeof(string), "banip %s",ipstring);
        SendRconCommand(string);
        return SendClientMessage(destid, COLOR_WHITE, "banned...");
}

CMD:reconnect(playerid, params[])
{
        new targetid;
        if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, COLOR_WHITE,"Usage:/Reconnect [playerid]");
        new string[16 + 6],destid = targetid,ipstring[16];
        if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, " Error:Player Is Not Connected!");
        GetPlayerIp(destid, ipstring, 16), SetPVarString(destid, "pIp", ipstring);
        format(string1, sizeof(string1), "unbanip %s", string1);
        SendRconCommand(string1);
        return SendClientMessage(destid, COLOR_WHITE, "unbanning...");
}
Using rcon
Reply
#9

I get what you mean don't worry.
I'll make it now, thanks anyway
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)