Guest User

Untitled

a guest
Jan 16th, 2014
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. stock mysql_PlayerGetInt(player[], key[]) {
  2. new tmpres;
  3.  
  4. new nick[30], string2[123];
  5. mysql_real_escape_string(player, nick);
  6.  
  7. format(string2, sizeof(string2), "select (%s) dupa from players where nick='%s'", key, nick);
  8. mysql_query(string2);
  9. printf("query: %s", string2);
  10. mysql_store_result();
  11. if(!mysql_num_rows())
  12. {
  13. mysql_free_result();
  14. return 0;
  15. }
  16. tmpres = mysql_fetch_int();
  17. mysql_free_result();
  18.  
  19. return tmpres;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment