21.07.2012, 07:34
It just doesn't execute on my host(Volt-Host), but does on my homehost.
Here's the code where is needs to be executed :
And here's the function:
I debugged the function and it stopped here
Here's the code where is needs to be executed :
pawn Код:
if(dialogid == DIALOG_LOGIN) {
if(response) {
if(!strlen(inputtext)) {
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Welcome Back!\nEnter your password below.", "This account is registered.\n\nEnter your password below to login.", "Login", "Cancel");
return 1;
}
else {
new string[258];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "users/%s.ini", name);
new File: hFile = fopen(string, io_read);
if (hFile) {
fclose(hFile);
OnPlayerLogin(playerid,inputtext);
}
}
}
else {
SendClientMessage(playerid, COLOR_LIGHTRED, "You chose not to login! (kicked).");
Kick(playerid);
}
}
pawn Код:
public OnPlayerLogin(playerid,password[])
{
new string2[128], keystring[256], string[256];
format(string2, sizeof(string2), "users/%s.ini", PlayerName(playerid));
keystring = dini_Get(string2, "Key");
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
if(strcmp(keystring, password, true) == 0)
{
....
pawn Код:
keystring = dini_Get(string2, "Key");