19.04.2013, 22:05
Dear sa-mp users,
I was buzy making a server, i was trying to make it with mysql but when i run the server he closes it, i have tried to look what is wrong but he stops just before he executes the mysql_query.
Here the OnPlayerConnect script
I hope someone can help me with this problem
I was buzy making a server, i was trying to make it with mysql but when i run the server he closes it, i have tried to look what is wrong but he stops just before he executes the mysql_query.
Here the OnPlayerConnect script
Код:
public OnPlayerConnect(playerid) { new query[256]; format(query, sizeof(query), "SELECT * FROM 'gebruikers' WHERE 'gebruikersnaam' = 'Kevin_Elias'"); mysql_query(query); mysql_store_result(); if(mysql_num_rows() == 1) { print("Send client message gebruikersnaam is al in gebruik"); SendClientMessage(playerid, -1, "Deze gebruikersnaam is al in gebruik!"); print("show player dialog 0"); ShowPlayerDialog(playerid, 0, DIALOG_STYLE_INPUT, "Login", "Log hier in", "login", "cancel"); } else { print("SendClientMessage je mag deze gebruikersnaam registreren"); SendClientMessage(playerid, -1, "Je mag deze gebruikersnaam registreren"); print("ShowPlayerDialog 1"); ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Registreer", "Registreer hier", "Registreer", "cancel"); } return 1; }