14.05.2015, 10:51
i think problem can be here ( in registration dialog )
EDIT :
i didn't use "PlayerFile_Create" anywhere.
PHP код:
Dialog_Register(playerid, response, passwordtext[])
{
new file[100], Name[MAX_PLAYER_NAME]; // Setup local variables
GetPlayerName(playerid, Name, sizeof(Name)); // Get the playername
format(file, sizeof(file), PlayerFile, Name); // Construct the complete filename for this player's account
switch (response) // Check which button was clicked
{
case 1: // Player clicked "Register"
{
// Check if the player entered a password
if(strlen(passwordtext) > 0)
{
new query[300];
// mysql_format(g_iHandle, query, sizeof(query), "INSERT INTO `users` (`PlayerName`, `Password`) VALUES ('%e', '%s')", GetPlayerNameEx(playerid), passwordtext);
mysql_format(g_iHandle, query, sizeof(query), "INSERT INTO `users` (`PlayerName`, `Password`, `email`) VALUES ('%e', '%s', '%s')", GetPlayerNameEx(playerid), passwordtext, APlayerData[playerid][Email]);
mysql_tquery(g_iHandle, query, "", "i", playerid);
// Send a message to the client to inform him that his account has been registered
SendClientMessage(playerid, 0xFFFFFFFF, TXT_AccountRegistered);
APlayerData[playerid][LoggedIn] = true; // The player has logged in properly
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, TXT_WrongPassword);
KickEx(playerid);
}
}
case 0: // Player clicked "Cancel"
{
// Show a message that the player must be registered to play on this server
SendClientMessage(playerid, 0xFFFFFFFF, TXT_PlayerMustRegister);
// Kick the player
KickEx(playerid);
}
}
return 1;
}
i didn't use "PlayerFile_Create" anywhere.