Advertisement
Guest User

Untitled

a guest
Feb 28th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1.  
  2. mysql_format(SQL, szString, 67, "SELECT * FROM `users` WHERE `name`='%s' LIMIT 0, 1", GetName(playerid));
  3. mysql_tquery(SQL, szString, "OnCheckLogin", "d", playerid);
  4. function OnCheckLogin(playerid) {
  5. if(cache_get_row_count() > 0) PlayerAccount[playerid] = 1;
  6. else PlayerAccount[playerid] = 0;
  7.  
  8. login[playerid] = SetTimerEx("LoginTimer", 30000, false,"d", playerid);
  9. PlayerTextdraws(playerid);
  10. CheckClassIP(playerid);
  11. return 1;
  12. }
  13.  
  14.  
  15. function MySQLCheckAccount(sqlplayersname[])
  16. {
  17. new escstr[30];
  18. mysql_escape_string(sqlplayersname, escstr);
  19. format(gString, sizeof(gString), "SELECT `id` FROM `users` WHERE `name`='%s' LIMIT 1", escstr);
  20. new Cache: ab = mysql_query( SQL, gString );
  21. if (cache_num_rows()==0)
  22. {
  23. cache_delete(ab);
  24. return 0;
  25. }
  26. else
  27. {
  28. new intid;
  29. intid = cache_get_field_content_int( 0, "id" );
  30. cache_delete(ab);
  31. return intid;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement