Advertisement
supertimor

Untitled

Jul 20th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public void WczytajDane(int client)
  2. {
  3. if(IsFakeClient(client))
  4. {
  5. wczytane_dane[client] = true;
  6. return;
  7. }
  8. if(!IsValidClient(client))
  9. return;
  10.  
  11. char authid[25];
  12. GetClientAuthId(client, AuthId_SteamID64, authid, sizeof(authid));
  13.  
  14. char zapytanie[512];
  15. Format(zapytanie, sizeof(zapytanie), "SELECT `steam_id` FROM `%s` WHERE `steam_id`='%s' AND `valid`='1';", TABELA, authid);
  16. if (DataBaseConnect())
  17. SQL_TQuery(sql, WczytajDane_Handler, zapytanie, client);
  18. }
  19. public void WczytajDane_Handler(Handle owner, Handle query, const char[] error, any client)
  20. {
  21. if (!StrEqual("", error)) {
  22. sql = INVALID_HANDLE;
  23. LogError("Błąd ładowania: %s", error);
  24. return;
  25. }
  26.  
  27. if(SQL_GetRowCount(query))
  28. AddUserFlags(client, Admin_Reservation);
  29.  
  30. wczytane_dane[client] = true;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement