27.04.2013, 16:31
I have this code but the fremove function is not working ..
Can someone help me ?
pawn Код:
new file[64];
if(dialogid == DIALOG_REG2)
{
if(RegistrationStep[playerid] == 2)
{
if(!response) // If they clicked 'Cancel' or pressed esc
{
SendClientMessage(playerid, COLOR_RED, "Enter your age correctly next time.");
format(file,sizeof(file),"/Users/%s.ini",GetName(playerid));
if(fexist(file))
{
fremove(file);
}
Kick(playerid);
}
else // Pressed ENTER or clicked 'Login' button
{
new age = strval(inputtext);
if(age < 16 || age > 80)
{
ShowPlayerDialog(playerid, DIALOG_REG2, DIALOG_STYLE_INPUT, "BLABLALBA", "BLABLALBA(BLABLALBA) ?", "Enter", "Exit");
SendClientMessage(playerid, COLOR_RED, "Please enter your age(16-80).");
return 0;
}
PlayerInfo[playerid][pAge] = age;
format(string, sizeof(string), "BLABLALBA",PlayerInfo[playerid][pAge]);
SendClientMessage(playerid, COLOR_LIGHTRED, string);
RegistrationStep[playerid] = 3;
ShowPlayerDialog(playerid, DIALOG_REG3, DIALOG_STYLE_LIST, " BLABLALBA", "Los Santos\nLas Venturas\nSan Fierro", "Select", "Exit");
}
}
return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText.
}