Guest User

Untitled

a guest
Jun 27th, 2012
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. forward MStream(); //Forward all timers
  2. public MStream()
  3. {
  4. for(new i; i<MAX_PLAYERS; i++)//Goes through all players
  5. {
  6. if(IsPlayerConnected(i)) //All online players
  7. {
  8. for(new S; S<MarkerID+1; S++) //All active Markers
  9. {
  10. if(MarkerUsed[S] == 1) //Checks if the Marker is enabled
  11. {
  12. if(IsPlayerInRangeOfPoint(i, MarkerInfo[S][Dist], MarkerInfo[S][x1], MarkerInfo[S][y1], MarkerInfo[S][z1]) && PlayerMarkers[i][S] == 0)//Is the player close enough to the Marker and the player does not already have it streamed
  13. {
  14. for(new K; K<100; K++)//Loops
  15. {
  16. if(SlotsUsed[i][K] == 0)//Through all the 100 avalible icon slots
  17. {
  18. SlotsUsed[i][K]++; //Sets the Icon slot to used
  19. IconID[i][S] = K; //Sets the iconid
  20. break; //Breaks out of the variable
  21. }
  22. }
  23. SetPlayerMapIcon(i, IconID[i][S], MarkerInfo[S][x1], MarkerInfo[S][y1], MarkerInfo[S][z1], MarkerInfo[S][markertype], MarkerInfo[S][color]);//Create the Marker
  24. PlayerMarkers[i][S] = 1; //Shows the object streamed for the player
  25. continue; //Pulls out of the loop alliteration.
  26. }
  27. }
  28. if(!IsPlayerInRangeOfPoint(i, MarkerInfo[S][Dist], MarkerInfo[S][x1], MarkerInfo[S][y1], MarkerInfo[S][z1]) && PlayerMarkers[i][S] == 1) //If the player falls out of that distance the marker is destroyed
  29. {
  30. SlotsUsed[i][IconID[i][S]] = 0; //Sets the Icon slot to used
  31. PlayerMarkers[i][S] = 0; //Sets the player marker to 0 so it's not using it
  32. RemovePlayerMapIcon(i, IconID[i][S]); //Deletes the map Icon
  33. continue;//Pulls out of the loop alliteration.
  34. }
  35. }
  36. }
  37. }
  38. return 1;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment