07.11.2011, 14:32
Hey guys,
Im making a 'disable account' command, but my compiler crashes when im trying to compile it.
It doesnt give any errors, otherwise it wouldnt crash
~Wesley
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;
}
pawn Код:
#define pPATH "RegisterSystem/Users/%s.ini"