Disable account
#1

Hey guys,

Im making a 'disable account' command, but my compiler crashes when im trying to compile it.

pawn Код:
CMD:disable(playerid, params[])
{
    if( PlayerInfo[playerid][p_Admin] > 5 )
    {
        new
            pID[24],
            Reason[50];
        if( !sscanf(params, "s[24]s[50]", pID, Reason) )
        {
            new
                pFile[50];
            format( pFile, sizeof pFile, pPATH, pID );
            if( fexist( pFile ) )
            {
                if( INI_Bool(pFile, "Account_Disabled") != true )
                {
                    INI_WriteString(pFile, "Account_Dis_Reason", Reason, 50);
                    INI_WriteBool(pFile, "Account_Disabled", true);
                }
                else
                {
                    SendClientMessage( playerid, COLOR_RED, "That characters account is already disabled. " );
                    return 1;
                }
            }
            else
            {
                SendClientMessage( playerid, COLOR_RED, "That file doesnt exist! Please check if the name is correct. " );
                return 1;
            }
        }
    }
    else
        return SendClientMessage( playerid, COLOR_RED, "You have to be an admin to perform this command. " );

    return 1;
}
It doesnt give any errors, otherwise it wouldnt crash
pawn Код:
#define pPATH                   "RegisterSystem/Users/%s.ini"
~Wesley
Reply


Messages In This Thread
Disable account - by Wesley221 - 07.11.2011, 14:32
Re: Disable account - by IstuntmanI - 07.11.2011, 14:43
Re: Disable account - by Wesley221 - 07.11.2011, 14:54
Re: Disable account - by Sascha - 07.11.2011, 15:42

Forum Jump:


Users browsing this thread: 2 Guest(s)