Kick- / Ban-Problem
#1

Heyho.
I've got a weird problem. Everytime i kick/ban people, the whole server gets banned/kicked. Is there a way how to fix it?!
My code is nothing special at all and even when i use a Admin-script like VAdmin, all people get kicked. The ban-file even just says, one person have been banned, what is very weird, because everytime when other people try to connect to the server, it says that they are banned, although their IP is NOT in the sa-mp ban-file.

Thanks.
Reply
#2

vAdmin fails.. try Ladmin?
Reply
#3

I agree, or Seifadmin, that is cool too, try that comes with alot of cmds
Reply
#4

Nope, i have made a own command... didn't even work either.

Code:
pawn Код:
dcmd_dkick(playerid, params[])
{
    new Kickid;
   
  if(sscanf(params, "u", Kickid))SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dkick [playerid]");
  else if(IsPlayerAdmin(playerid)==0)SendClientMessage(playerid, COLOR_RED, "You Are Not An Admin!!!");
  else if(Kickid==playerid)SendClientMessage(playerid, COLOR_ORANGE, "You Cannot Kick Yourself!");
  else if(IsPlayerAdmin(Kickid))SendClientMessage(playerid, COLOR_RED, "You May Not Kick Admins!!!");
  else if(Kickid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "Player not found");
  else
  {
        new KickedName[MAX_PLAYER_NAME],AdminName[MAX_PLAYER_NAME],KickMessage[128];
        GetPlayerName(Kickid, KickedName, sizeof(KickedName));
        GetPlayerName(playerid, AdminName, sizeof(AdminName));
        format(KickMessage, sizeof(KickMessage), "%s has been kicked by %s!", KickedName, AdminName);
        SendClientMessageToAll(COLOR_ORANGE, KickMessage);
       
        Kick(Kickid);
    }
 
    return 1;
}
For me it looks like it should work :S
Reply
#5

well, if you want kickmessage to work like a reason then you need to tell the sscanf so, thats one wrong line

replace it with
Код:
if(sscanf(params, "uz", Kickid, Kickmessage))SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dkick [playerid] [reason]");
Reply
#6

Quote:
Originally Posted by Niixie
well, if you want kickmessage to work like a reason then you need to tell the sscanf so, thats one wrong line

replace it with
Код:
if(sscanf(params, "uz", Kickid, Kickmessage))SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dkick [playerid] [reason]");
That's not my problem. Watch first post...
Reply
#7

pawn Код:
dcmd_dkick(playerid, params[])
{
    new
        Kickid;

    if(sscanf(params, "u", Kickid)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dkick [playerid]");
    if(IsPlayerAdmin(playerid) == 0) return SendClientMessage(playerid, COLOR_RED, "You are not an admin.");
    if(Kickid == playerid) return SendClientMessage(playerid, COLOR_ORANGE, "You cannot kick yourself!");
    if(IsPlayerAdmin(Kickid)) return SendClientMessage(playerid, COLOR_RED, "You may not kick admins.");
    if(Kickid == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "Player not found.");

    new
        KickedName[MAX_PLAYER_NAME],
        AdminName[MAX_PLAYER_NAME],
        KickMessage[128];
       
    GetPlayerName(Kickid, KickedName, sizeof(KickedName));
    GetPlayerName(playerid, AdminName, sizeof(AdminName));
    format(KickMessage, sizeof(KickMessage), "%s has been kicked by %s!", KickedName, AdminName);
    SendClientMessageToAll(COLOR_ORANGE, KickMessage);
    Kick(Kickid);
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)