18.06.2014, 20:14
pawn Код:
public MySQLCreateAccount(newplayersname[], newpassword[], playerid)
{
new query[300];
new sqlplyname[64];
//new sqlpassword[64];
new parolacript[129];
mysql_real_escape_string(newplayersname, sqlplyname);
//mysql_real_escape_string(newpassword, sqlpassword);
WP_Hash(parolacript, sizeof(parolacript), newpassword);
format(query, sizeof(query), "INSERT INTO players (Name, Password) VALUES ('%s', '%s')", sqlplyname, parolacript);
mysql_query(query);
Registerr[playerid] = 2;
new string[256];
format(string, sizeof(string), "%s s-a inregistrat pe server!",newplayersname);
ABroadCast(COLOR_LIGHTRED,string,1);
SBroadCast(COLOR_LIGHTRED, string);
print("[MySQL]: Un nou cont a fost creat in baza de date!(..)01");
mysql_free_result();
print("[MySQL]: Un nou cont a fost creat in baza de date!(..)02");
//mysql_free_result();
new newplayersid = MySQLCheckAccount(newplayersname);
if (newplayersid != 0)
{
return newplayersid;
}
return 0;
}
How can create the data base .sql?