[GameMode] The ReBorn Dudes Freeroam/Roleplay Script
#22

Hey bro, I am having issues with the /ban, /br and the /unban commands and can't figure it out. It keeps on saying "Player didn't found in database."

pawn Код:
CMD:unban(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
        new PlayerFile[50],string[128];
        format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
        if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/unban [playername]");
        if(!dini_Exists(PlayerFile)){SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
        else
        {
            if(dini_Int(PlayerFile,"Banned")==0)return SendClientMessage(playerid,-1,"That Player is already unbanned");
            dini_IntSet(PlayerFile, "Banned", 0);
            SendClientMessage(playerid, COLOR_WHITE, "Account Unbanned");
            format(string,sizeof(string),"unbanip %s",dini_Get(PlayerFile,"IP"));
            SendRconCommand(string);
        }
    }else return 0;
    return 1;
}
CMD:ban(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 3)
    {
        new PlayerFile[50];
        format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
        if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/oban [playername]");
        if(!dini_Exists(PlayerFile)) {SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
        else
        {
            if(dini_Int(PlayerFile,"Banned")==1)return SendClientMessage(playerid,-1,"That Player is already banned");
            dini_IntSet(PlayerFile, "Banned", 1);
            SendClientMessage(playerid, COLOR_WHITE, "Account Banned");}
    }else return 0;
    return 1;
}
//==============================================================================
CMD:br(playerid, params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= 2)
    {
        new PlayerFile[50];
        format(PlayerFile, sizeof(PlayerFile), "Saves/%s.ini", params);
        if(!strlen(params)) return SendClientMessage(playerid, COLOR_GREY, "/banreason [playername]");
        if(!dini_Exists(PlayerFile)) {SendClientMessage(playerid, COLOR_GREY, "No such player found in the database.");}
        if(dini_Int(PlayerFile,"Banned")==1)
        {
            new str[256];
            format(str,sizeof(str),"\"%s\" was banned for \"%s\" by \"%s\"",params,dini_Get(PlayerFile,"Reason"),dini_Get(PlayerFile,"Banner"));
            SendClientMessage(playerid, COLOR_WHITE, str);
        }else return SendClientMessage(playerid,-1,"That Player is not banned");
    }else return 0;
    return 1;
}
Reply


Messages In This Thread
The ReBorn Dudes Roleplay Script - by LaGrande - 10.03.2013, 06:41
Re: The ReBorn Dudes Freeroam/Roleplay Script - by freddy smyth - 10.03.2013, 06:52
Re: The ReBorn Dudes Freeroam/Roleplay Script - by shoaib_sait - 10.03.2013, 06:57
Re: The ReBorn Dudes Freeroam/Roleplay Script - by ajam123 - 10.03.2013, 07:00
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Yves - 10.03.2013, 07:41
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Broker - 10.03.2013, 07:58
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Yves - 10.03.2013, 08:02
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Igi_Guduric - 10.03.2013, 08:18
Re: The ReBorn Dudes Freeroam/Roleplay Script - by N0FeaR - 10.03.2013, 09:35
Re: The ReBorn Dudes Freeroam/Roleplay Script - by MehranGta - 10.03.2013, 16:02
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Farman - 13.04.2013, 02:49
Re: The ReBorn Dudes Freeroam/Roleplay Script - by IceBilizard - 28.04.2013, 17:08
Re: The ReBorn Dudes Freeroam/Roleplay Script - by VIP475 - 30.04.2013, 14:36
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Cagalume - 30.04.2013, 15:03
Re: The ReBorn Dudes Freeroam/Roleplay Script - by LaGrande - 02.05.2013, 22:05
Re: The ReBorn Dudes Freeroam/Roleplay Script - by donissabaluch - 02.05.2013, 22:12
Re: The ReBorn Dudes Freeroam/Roleplay Script - by LaGrande - 08.05.2013, 08:13
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Goldilox - 10.05.2013, 05:02
AW: Re: The ReBorn Dudes Freeroam/Roleplay Script - by LaGrande - 10.05.2013, 11:11
Re: The ReBorn Dudes Freeroam/Roleplay Script - by xRaZeR - 10.05.2013, 15:01
Re: The ReBorn Dudes Freeroam/Roleplay Script - by [L]azy[H]aze - 10.05.2013, 15:59
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Goldilox - 20.05.2013, 20:18
Re: The ReBorn Dudes Freeroam/Roleplay Script - by LaGrande - 21.05.2013, 11:16
Re: The ReBorn Dudes Freeroam/Roleplay Script - by x96664 - 07.10.2013, 19:20
Re: The ReBorn Dudes Freeroam/Roleplay Script - by NoobPlayer - 06.04.2014, 08:06
Re: The ReBorn Dudes Freeroam/Roleplay Script - by LaGrande - 17.04.2014, 20:45
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Adornil - 08.11.2014, 09:59
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Iklesos - 13.01.2015, 11:14
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Iklesos - 13.01.2015, 18:48
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Maximun - 13.01.2015, 21:55
Re: The ReBorn Dudes Freeroam/Roleplay Script - by TomIrish - 01.03.2015, 13:32
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Samiullah - 24.07.2015, 16:52
Re: The ReBorn Dudes Freeroam/Roleplay Script - by RedLabel - 24.07.2015, 20:56
Re: The ReBorn Dudes Freeroam/Roleplay Script - by JigglingSexually - 29.07.2015, 06:39
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Hamza30 - 26.08.2015, 11:47
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Adornil - 30.08.2015, 20:54
Re: The ReBorn Dudes Freeroam/Roleplay Script - by ProDeplex - 25.11.2016, 02:11
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Quinncell - 25.11.2016, 09:56
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Yaa - 25.11.2016, 11:47
Re: The ReBorn Dudes Freeroam/Roleplay Script - by RyderX - 25.11.2016, 11:51
Re: The ReBorn Dudes Freeroam/Roleplay Script - by roldan21 - 25.11.2016, 12:08
Re: The ReBorn Dudes Freeroam/Roleplay Script - by DelSasso - 26.11.2016, 16:32
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Pyarsingh - 15.05.2017, 04:53
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Kimsa - 15.05.2017, 09:45
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Electron123 - 15.05.2017, 10:38
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Pyarsingh - 15.05.2017, 19:33
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Electron123 - 04.06.2017, 11:39
Re: The ReBorn Dudes Freeroam/Roleplay Script - by ProDeplex - 08.06.2017, 22:03
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Zainrock - 09.06.2017, 22:52
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Madddy - 12.12.2017, 16:14
Re: The ReBorn Dudes Freeroam/Roleplay Script - by BulletRaja - 24.12.2017, 10:35
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Shravan859 - 10.01.2018, 14:11
Re: The ReBorn Dudes Freeroam/Roleplay Script - by NotSteven - 20.05.2018, 05:14
Re: The ReBorn Dudes Freeroam/Roleplay Script - by NotSteven - 20.05.2018, 07:31
Re: The ReBorn Dudes Freeroam/Roleplay Script - by Yukie - 05.03.2019, 06:45

Forum Jump:


Users browsing this thread: 1 Guest(s)