Advertisement
Custura

Untitled

May 1st, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. OnPlayerConnect am pus asa
  2. for(new i; i < sizeof(TurfInfo); ++i)
  3. {
  4. Turfs[i] = GangZoneCreateM(TurfInfo[i][zMinX],TurfInfo[i][zMinY],TurfInfo[i][zMaxX],TurfInfo[i][zMaxY]);
  5. }
  6.  
  7. OnGameModeInit am pus asa
  8.  
  9. mysql_function_query(g_iHandle, "SELECT * FROM `turfs`", true, "LoadTurfs", "");
  10.  
  11. iar acesta este public-ul de loadturfs
  12.  
  13.  
  14. public LoadTurfs()
  15. {
  16. static
  17. rows,
  18. fields;
  19.  
  20. cache_get_data(rows, fields, g_iHandle);
  21.  
  22. for(new i = 1; i < rows; i ++) if (i < MAX_ZTURFS)
  23. {
  24. TurfInfo[i][zID] = cache_get_field_int(i, "ID");
  25. TurfInfo[i][zOwned] = cache_get_field_int(i, "Owned");
  26. TurfInfo[i][zTime] = cache_get_field_int(i, "Time");
  27. TurfInfo[i][zMinX] = cache_get_field_float(i, "MinX");
  28. TurfInfo[i][zMinY] = cache_get_field_float(i, "MinY");
  29. TurfInfo[i][zMaxX] = cache_get_field_float(i, "MaxX");
  30. TurfInfo[i][zMaxY] = cache_get_field_float(i, "MaxY");
  31. }
  32. printf( "Successfully Loaded [%d] Turfs", rows );
  33. return true;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement