Help with dini_IntSet
#3

Quote:
Originally Posted by jonnyboy
Посмотреть сообщение
for unban:

pawn Код:
dcmd_unban(playerid, params[])
{
    new pName[24], pFile[50], str[256], playerIP[256];
    if(PlayerInfo[playerid][pAdmin] < 1)
    {
        SendClientMessage(playerid, COLOR_RED, "You are not authorized to use that command!");
        return true;
    }
    GetPlayerName(playerid, pName, sizeof(pName));
    format(pFile, sizeof(pFile), "LARP/Users/%s.ini", params);
    playerIP = dini_Get(pFile, "PlayerIP");
    if(!strlen(params))
    {
        SendClientMessage(playerid, COLOR_GRAD1, "Usage: /unban [playername]");
        return true;
    }
    if(!dini_Exists(pFile))
    {
        SendClientMessage(playerid, COLOR_GRAD1, "No such player found in the database.");
        return true;
    }
    format(str, sizeof str, "unbanip %s", playerIP);
    PlayerInfo[playerid][Locked] = 0;
    PlayerInfo[playerid][Banned] = 0;
    return true;
}
make sure also to edit. to it fit with your GM
thanks
but i have one little question (read first post)..
Reply


Messages In This Thread
Help with dini_IntSet - by Tama - 03.05.2011, 16:23
Re: Help with dini_IntSet - by jonnyboy - 03.05.2011, 16:26
Re: Help with dini_IntSet - by Tama - 03.05.2011, 16:30
Re: Help with dini_IntSet - by jonnyboy - 03.05.2011, 16:37
Re: Help with dini_IntSet - by MadeMan - 03.05.2011, 16:41
Re: Help with dini_IntSet - by Tama - 03.05.2011, 16:54
Re: Help with dini_IntSet - by MadeMan - 03.05.2011, 16:59
Re: Help with dini_IntSet - by Xaviour212 - 10.05.2011, 16:04

Forum Jump:


Users browsing this thread: 2 Guest(s)