Ioannis20x

Untitled

Nov 28th, 2021
709
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. loadfraks()
  2. {
  3. new string[256],query[256];
  4. for(new i=0;i<sizeof(fInfo);i++){
  5.     format(query,sizeof(query),"SELECT * FROM fraktionen WHERE id='%i'",fInfo[i][f_ID]);
  6.     format(string,sizeof(string),"Fraktion: %s wurde Geladen",fInfo[i][f_name]);
  7.     mysql_function_query(dbhandle,query,true,"OnFraksLoad","i");
  8.    
  9.     printf(string);
  10. }}
  11.  
  12.  
  13. public OnFraksLoad()
  14. {
  15.     new num_fields,num_rows;
  16.     cache_get_data(num_rows,num_fields,dbhandle);
  17.     if(!num_rows)return 1;
  18.     for(new i=0; i<num_rows; i++)
  19.     {
  20.         fInfo[i][f_kasse]=cache_get_field_content_int(i,"Bank",dbhandle);
  21.         fInfo[i][f_gold]=cache_get_field_content_int(i,"Gold",dbhandle);
  22.         fInfo[i][f_lsd]=cache_get_field_content_int(i,"LSD",dbhandle);
  23.         fInfo[i][f_green]=cache_get_field_content_int(i,"Green",dbhandle);
  24.     }
  25.  
  26. return 1;
  27. }
RAW Paste Data