Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- forward MStream(); //Forward all timers
- public MStream()
- {
- for(new i; i<MAX_PLAYERS; i++)//Goes through all players
- {
- if(IsPlayerConnected(i)) //All online players
- {
- for(new S; S<MarkerID+1; S++) //All active Markers
- {
- if(MarkerUsed[S] == 1) //Checks if the Marker is enabled
- {
- 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
- {
- for(new K; K<100; K++)//Loops
- {
- if(SlotsUsed[i][K] == 0)//Through all the 100 avalible icon slots
- {
- SlotsUsed[i][K]++; //Sets the Icon slot to used
- IconID[i][S] = K; //Sets the iconid
- break; //Breaks out of the variable
- }
- }
- SetPlayerMapIcon(i, IconID[i][S], MarkerInfo[S][x1], MarkerInfo[S][y1], MarkerInfo[S][z1], MarkerInfo[S][markertype], MarkerInfo[S][color]);//Create the Marker
- PlayerMarkers[i][S] = 1; //Shows the object streamed for the player
- continue; //Pulls out of the loop alliteration.
- }
- }
- 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
- {
- SlotsUsed[i][IconID[i][S]] = 0; //Sets the Icon slot to used
- PlayerMarkers[i][S] = 0; //Sets the player marker to 0 so it's not using it
- RemovePlayerMapIcon(i, IconID[i][S]); //Deletes the map Icon
- continue;//Pulls out of the loop alliteration.
- }
- }
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment