14.10.2009, 05:38
Hey everyone, having some problems reading data from my MYSQL database.
I have connected to the database fine etc. just having trouble reading from the database and assigning the value to a variable, string etc.
I have connected to the database fine etc. just having trouble reading from the database and assigning the value to a variable, string etc.
Код:
IsUserAdmin(playerid) { new string[256],name[24],admin,line[256]; GetPlayerName(playerid,name,24); format(string,sizeof(string),"SELECT * FROM dd_users WHERE nickname='%s'", name); samp_mysql_query(string); samp_mysql_store_result(); samp_mysql_num_rows(); while(samp_mysql_fetch_row(line)) { samp_mysql_strtok(admin,"|",line); } if(admin==1) { return 1; } else { return 0; } }