Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.29 KB | None | 0 0
  1. forward LoadMetroStops();
  2. public LoadMetroStops()
  3. {
  4.     new x, id;
  5.     while(x < cache_rows())
  6.     {
  7.         cache_get_value_name_int(x, "id", id);
  8.         MetroStop[id][ID] = id;
  9.         lastmetro = id;
  10.         MetroStop[id][MVW] = id;
  11.         cache_get_value_name(x, "name", MetroStop[id][MN], 100);
  12.         cache_get_value_name_float(x, "x", MetroStop[id][MX]);
  13.         cache_get_value_name_float(x, "y", MetroStop[id][MY]);
  14.         cache_get_value_name_float(x, "z", MetroStop[id][MZ]);
  15.         cache_get_value_name_float(x, "rx", MetroStop[id][MRX]);
  16.         cache_get_value_name_float(x, "ry", MetroStop[id][MRY]);
  17.         cache_get_value_name_float(x, "rz", MetroStop[id][MRZ]);
  18.         MetroStop[id][Object] = CreateObject(2944, MetroStop[id][MX], MetroStop[id][MY], MetroStop[id][MZ], MetroStop[id][MRX], MetroStop[id][MRY], MetroStop[id][MRZ]);
  19.         MetroStop[id][Label] = Create3DTextLabel(MetroStop[id][MN], -1, MetroStop[id][MX], MetroStop[id][MY], MetroStop[id][MZ], 20.0, 0);
  20.         printf(">> %s metro stop loaded.", MetroStop[id][MN]);
  21.         x++;
  22.     }
  23.     MetroStop[0][ID] = 0;
  24.     format(MetroStop[0][MN], 100, "Üzemi terület");
  25.     print(">> Metro stops have been loaded.");
  26.     printf(">> Proceed to start the first metro from stop 1 to stop %d", id);
  27.     printf(">> Proceed to start the second metro from stop %d to stop 1", id);
  28.     SetTimer("MetroStarterLoop", 10*1000, 0);
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement