09.01.2015, 19:25
my bad i did
mysql should be mysql_handle
try now
pawn Код:
cache_get_data(rows, fields, mysql);//let's get the rows and fields from the database.
try now
pawn Код:
public OnPlayerCheck(playerid) {
new rows ,fields ,string[300];
cache_get_data(rows, fields, mysql_handle);//let's get the rows and fields from the database.
if(rows) {
cache_get_field_content(0, "Password", PlayerInfo[playerid][pPassword], mysql_handle, 129);
PlayerInfo[playerid][pID] = cache_get_field_content_int(0, "ID");
format(string, sizeof(string), "{FFFFFF}Welcome back {2098AE}%s {FFFFFF}!\nType your password below to login!\nYou have only {FF0000}5 {FFFFFF}attempts to type corect password.", GetPName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, 3, "{FFFF00}Loging in:", string, "Login", "Cancel");
} else {
format(string, sizeof(string), "{FFFFFF}Welcome {2098AE}%s {FFFFFF}!\nType password below into the input to register!\nThe password must to be 5 to 30 characters long!", GetPName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, 3, "{FFFF00}Registering:", string, "Register", "Cacnel");
}
return 1;
}