Guest User

Untitled

a guest
Nov 21st, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. stock IncarcaSBIZZ()
  2. {
  3. new Cache: Result = mysql_query( SQL, "SELECT * FROM `sBusiness`" );
  4. new IDSB, string[256], rows = cache_get_row_count();
  5. for(new i = 0; i < rows; i++)
  6. {
  7. IDSB = cache_get_field_content_int( i, "ID");
  8. sBizz[IDSB][sBOwnable] = cache_get_field_content_int( i, "Ownable");
  9. sBizz[IDSB][sBDeposit] = cache_get_field_content_int( i, "Depozit");
  10. sBizz[IDSB][sBSettings] = cache_get_field_content_int( i, "Settings");
  11. sBizz[IDSB][sBPret] = cache_get_field_content_int( i, "Pret");
  12. sBizz[IDSB][sBFee] = cache_get_field_content_int( i, "Fee");
  13. sBizz[IDSB][sBX] = cache_get_field_content_float( i, "PozitieX", SQL );
  14. sBizz[IDSB][sBY] = cache_get_field_content_float( i, "PozitieY", SQL );
  15. sBizz[IDSB][sBZ] = cache_get_field_content_float( i, "PozitieZ", SQL );
  16. cache_get_field_content( i, "Titlu", sBizz[IDSB][sBTitlu], SQL, 80 );
  17. cache_get_field_content( i, "Detinator", sBizz[IDSB][sBDetinator], SQL, 50 );
  18. CreateDynamicPickup(1239, 1, sBizz[IDSB][sBX], sBizz[IDSB][sBY], sBizz[IDSB][sBZ], -1, -1, -1, 250.0);
  19. if(sBizz[IDSB][sBOwnable] == 0)
  20. {
  21. format(string, sizeof(string), "{FFCC00}[ %s ]\n\n( Pret de cumparare: {00cc33}%s${FFCC00} )\n{FFCC00}( Tasteaza {CC0033}/buysbizz{FFCC00} )", sBizz[IDSB][sBTitlu], FormatMoney(sBizz[IDSB][sBPret]));
  22. sbizz[IDSB] = CreateDynamic3DTextLabel(string, COLOR_DCHAT, sBizz[IDSB][sBX], sBizz[IDSB][sBY], sBizz[IDSB][sBZ]+0.75,10.0,INVALID_PLAYER_ID,INVALID_VEHICLE_ID,1,0,-1,-1, 3.5);
  23. }
  24. if(sBizz[IDSB][sBOwnable] == 1)
  25. {
  26. format( szQuery, 500, "SELECT * FROM `Accounts` WHERE `Name` = '%e' LIMIT 1;", sBizz[IDSB][sBDetinator] );
  27. new Cache: result2 = mysql_query( SQL, szQuery );
  28. new Get[ 2 ];
  29. cache_get_data( Get[ 0 ], Get[ 1 ], SQL );
  30. if( !Get[ 0 ] )
  31. {
  32. sBizz[IDSB][sBOwnable] = 0;
  33. format( sBizz[IDSB][sBDetinator], 50, "No-One");
  34. }
  35. }
  36. sSBizz++;
  37. }
  38. GasPrice = sBizz[1][sBSettings] * Rata;
  39. cache_delete( Result );
  40. printf("[X] sBusiness Loaded - %d",sSBizz);
  41. }
Advertisement
Add Comment
Please, Sign In to add comment