10.08.2011, 23:28
This is a exemple when the dialog response
NOTE: YOU HAVE TO CHANGE THE PARAMS IN [ ]
pawn Код:
new
query[256],
playerName[MAX_PLAYER_NAME],
escapedName[MAX_PLAYER_NAME],
escapedPassword[129];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
WP_Hash(escapedPassword, sizeof(escapedPassword), inputtext);
mysql_real_escape_string(inputtext, escapedPassword);
mysql_real_escape_string(playerName, escapedName);
format(query, sizeof(query), "SELECT * FROM `[YourAccounts]` WHERE [yourfield]= '%s' AND [passfield] = '%s'", escapedName, escapedPassword);
mysql_query(query, [YourQuery], playerid);