Problem with Ban Command
#1

Alright i have this command

pawn Код:
CMD:ban(playerid,params[]) {
    new reason[100], id,szString[64];
    if(PInfo[playerid][Level] < 2) return SendClientMessage(playerid,0xFF0000AA,"ERROR: You are not allowed to use this command!");
        if(sscanf(params,"ds",id,reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /ban <playerid> <reason>");
        if (!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_RED, "ERROR: Player is not connected.");
        new PlayerName[MAX_PLAYER_NAME];
        GetPlayerName(id, PlayerName, sizeof(PlayerName));
        new GPlayerName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, GPlayerName, sizeof(GPlayerName));
        new plrIP[64];
        GetPlayerIp(id, plrIP, 64);
        new Year, Month, Day;
        getdate(Year, Month, Day);
        format(szString, sizeof(szString), "%s (ID:%d) has been banned by %s Reason: %s", PlayerName,GPlayerName, id, reason);
        SendClientMessageToAll(0xFF444499, szString);
        format(szString, sizeof(szString), "Admin %s, Used The Command: 'BAN' Target: %s", GPlayerName, PlayerName);
        SendClientMessageToAdmins(szString);
        format(szString, sizeof(szString), "You Have Been Banned By Admin: %s (ID:%d)", GPlayerName, playerid);
        SendClientMessage(id, 0x00B359FF, szString);
        format(szString, sizeof(szString), "Reason: %s", reason);
        SendClientMessage(id, 0x00B359FF, szString);
        format(szString, sizeof(szString), "Date: %02d/%02d/%d", Day, Month, Year);
        SendClientMessage(id, 0x00B359FF, szString);
        SendClientMessage(id, 0xF74646FF, "If you wish to appeal this ban, Then Appeal At: TOBEANNOUNCED");
        format(szString, sizeof(szString), "[BAN] | Admin: %s | Name: %s | Reason: %s | Date: %02d/%02d/%d | IP: %s<hr/>", GPlayerName, PlayerName, reason, Day, Month, Year, plrIP);
        Ban(id);
        return 1;
 }
But i want it to save a banned variable what i already made but i can't get it working properly
I'm using SII include.
pawn Код:
INI_WriteInt("Banned",1);
And than onplayerconnect when the Banned = 1 i want it to send a message

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

As you can see in my ban cmd. thanks.
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)