Saving system
#2

pawn Код:
CMD:banip(playerid,params[]) {
    if (pInfo[playerid][pAdmin] >= 4) {
        new PlayerName[MAX_PLAYER_NAME], ip[15];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(sscanf(params,"s",ip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /banip <IP>");
        format(szString, sizeof(szString), "banip %s", ip);
        SendRconCommand(szString);
        format(szString, sizeof(szString), "* You have successfully IP Banned: %s", ip);
        SendClientMessage(playerid, COLOR_GREEN, szString);
        format(szString, sizeof(szString), "reloadbans");
        SendRconCommand(szString);
    }
    else {
        return 0;
    }
    return 1;
}

CMD:unbanip(playerid,params[]) {
    if (pInfo[playerid][pAdmin] >= 4) {
        new PlayerName[MAX_PLAYER_NAME], ip[15];
        GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
        if(sscanf(params,"s",ip)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /unbanip <IP>");
        format(szString, sizeof(szString), "unbanip %s", ip);
        SendRconCommand(szString);
        format(szString, sizeof(szString), "* You have successfully unbanned the IP: %s", ip);
        SendClientMessage(playerid, COLOR_GREEN, szString);
        format(szString, sizeof(szString), "reloadbans");
        SendRconCommand(szString);
    }
    else {
        return 0;
    }
    return 1;
}
Here this might help and for save IP i don't know how to do it sorry.You got to mae somethin like OnPlayerDisconnect in the command.
Reply


Messages In This Thread
Saving system - by _Khaled_ - 04.09.2012, 12:51
Re: Saving system - by ThePrograme - 04.09.2012, 12:57
Re: Saving system - by _Khaled_ - 04.09.2012, 13:06
Re: Saving system - by ThePrograme - 04.09.2012, 13:11
Re: Saving system - by _Khaled_ - 06.09.2012, 01:53
Re: Saving system - by Jermi - 06.09.2012, 03:57
Re: Saving system - by _Khaled_ - 06.09.2012, 11:58
Re: Saving system - by _Khaled_ - 07.09.2012, 02:45

Forum Jump:


Users browsing this thread: 1 Guest(s)