30.07.2011, 22:23
It crashs my server. whats wrong ?
PHP Code:
if(dialogid == 1) {
new file[128], name[MAX_PLAYER_NAME], str[128];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(file, sizeof(file), "scriptfiles/UsersNEW/%s.ini", name);
if(response) {
if(strlen(inputtext)) {
dini_Create(file);
dini_IntSet(file, "pw", num_hash(inputtext));
dini_IntSet(file, "AdminLevel", PlayerInfo[playerid][AdminLevel]);
dini_IntSet(file, "cash", PlayerInfo[playerid][cash]);
dini_IntSet(file, "level", PlayerInfo[playerid][level]);
format(str, sizeof(str), "You are registered as ~r~%s. Your password is ~r~%s. /changepass to change it", name, inputtext);
SendClientMessage(playerid, COLOR_WHITE, str);
PlayerInfo[playerid][level] = dini_Int(file, "level");
PlayerInfo[playerid][cash] = dini_Int(file, "cash");
PlayerInfo[playerid][AdminLevel] = dini_Int(file, "AdminLevel");
}
}
else {
Kick(playerid);
}
}