Du musst es ungefähr so machen:
format(query, sizeof(query), "SELECT * FROM `users` WHERE `name` = '%s'", pname2);
samp_mysql_query(query);
samp_mysql_store_result();
samp_mysql_fetch_row(line);
new passwd[32];
samp_mysql_get_field("Passwort", passwd);
if(strcmp(string, passwd, true) == 0)....