Problem with Ban Command
#7

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Then under the /ban command, add

PInfo[id][Banned] = 1;

That should work, then it will call onplayerdisconnect.

Edit: Also, change

Ban(id);

to

Kick(id);

as it will ban them from the server and just show "You are banned from this server.".

That way, you can add your own custom message under OnPlayerConnect.
Yep tested that works but now how do i make that custom message saying

You are banned from this server
Banned by:
Reason:"
Date:

Just like in the ban cmd?

pawn Код:
public OnPlayerConnect(playerid) {
    SendClientMessage(playerid,red,"Welcome to United Kingdom TDM! Dont forget to check /updates ! ");
    SendClientMessage(playerid,GREEN,"Remember to /buyrank to buy a rank ");
    new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "** %s has joined United Kingdom TDM", name);
    IsOnAdminDuty[playerid] = false;
    PInfo[playerid][Money] = 0;
    PInfo[playerid][Score] = 0;
    PInfo[playerid][Kills] = 0;
    PInfo[playerid][Deaths] = 0;
    PInfo[playerid][Level] = 0;
    PInfo[playerid][Rank] = 0;
    SendClientMessageToAll(-1, string);
    PMEnabled[playerid] = 1;
    IsMuted[playerid] = 0;
    TogglePlayerSpectating(playerid, false);
   
    new file[64],PlayerName[25];//Creating a variable where we can store the file path, and the variable to store the player's name.
    GetPlayerName(playerid,PlayerName,sizeof PlayerName);//Storing the players name in the PlayerName variable.
    format(file,sizeof file,"Admin/%s.ini",PlayerName);//Storing the file path with the players name.
    if(fexist(file)) {
        ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login Below", "Enter Your Password To Login!", "Login", "Quit");
    } else {
        ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Register Below", "Enter A Password To Register And Play!", "Register", "Quit");
    }
    return 1;
}
Reply


Messages In This Thread
Problem with Ban Command - by Biess - 31.01.2013, 17:00
Re: Problem with Ban Command - by iGetty - 31.01.2013, 17:08
Re: Problem with Ban Command - by Biess - 31.01.2013, 17:12
Re: Problem with Ban Command - by tyler12 - 31.01.2013, 17:13
Re: Problem with Ban Command - by Biess - 31.01.2013, 17:17
Re: Problem with Ban Command - by iGetty - 31.01.2013, 17:19
Re: Problem with Ban Command - by Biess - 31.01.2013, 17:23
Re: Problem with Ban Command - by tyler12 - 31.01.2013, 17:32
Re: Problem with Ban Command - by Biess - 31.01.2013, 17:33
Re: Problem with Ban Command - by tyler12 - 31.01.2013, 17:36

Forum Jump:


Users browsing this thread: 1 Guest(s)