Guest User

Untitled

a guest
Feb 10th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.92 KB | None | 0 0
  1. forward OnItemSpawn();
  2.  
  3. static Float:BoxItemPlace[][3] =
  4. {
  5.     {-1791.2888, 1208.8975, 24.2469},
  6.     {-3736.1692, -1781.7969, 4.4530},
  7.     {-2538.9451, 47.6585, 7.7112},
  8.     {-283.2101, -2151.9351, 27.6529},
  9.     {-924.8263, -496.6608, 25.8673},
  10.     {224.2276, 1923.1722, 16.7572},
  11.     {-2492.5334, 2356.0469, 9.2019},
  12.     {1965.1840, 1620.3276, 11.9959},
  13.     {1122.7972, -2041.0688, 69.0107},
  14.     {-2811.8206, -1515.3728, 139.9439}
  15. };
  16. public OnItemSpawn()
  17. {
  18.     new randompos = random(sizeof(BoxItemPlace));
  19.     DestroyObject(BoxItem);
  20.     BoxItem = CreateObject(2969, BoxItemPlace[randompos][0], BoxItemPlace[randompos][1], BoxItemPlace[randompos][2], 0.0, 0.0, 0.0);
  21.     Delete3DTextLabel(Box_text);
  22.     Box_text = Create3DTextLabel("Box. Use /take", 0xFFBE00FF, BoxItemPlace[randompos][0], BoxItemPlace[randompos][1], BoxItemPlace[randompos][2], 10.0, 0, 1);
  23.     return 1;
  24. }
  25.  
  26. public OnGameModeInit()
  27. {
  28.     SetTimer("OnItemSpawn", 120000, true);
  29.     return 1;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment