[Include] [INC] eRP Pickup Streamer NOW VERSION 3!
#1

INFO

Hello!
I didn't see any (standalone) Pickup Streamers so I made one for Estonian RolePlay server and decided to release it.
Hopefully it will be helpful for someone. It has been tested with 32 000 pickups and it worked just fine.
This is perfect for RP servers, so there can be pretty much unlimited houses, "info spots", businesses, entrances.. whatever you choose to mark with a pickup.
However the normal 300 pickup limit applies. There cant be more than 300 pickups visible at one time. If you notice pickups not appearing then you need to decrease streaming range.. or increase limit if that's the case.

*NOTE*: Do not set the MAX_PICKUPS too high. Only set it to what you need. This way you will save some server resources.

*TIP*To avoid trouble of changing all the ranges for StreamPickups later on you could define the value, and then use it in adding the StreamPickups. Just add "#define PICKUP_RANGE 50" to the top-part of your GM and create pickups like this: CreateStreamPickup(1273, 1, X, Y, Z ,PICKUP_RANGE);.


It has 6 functions and 1 callback (v2):
  • CreateStreamPickup(model,type,Float,Float:y,Floa t:z,range);
    This is very much like your regular CreatePickup function. Except it also has range which sets the distance how near the player needs to be to the pickup for it to show.
    Returns StreamPickup ID if pickup was succesfully created, or -1 if limit has been reached. Default limit is 10 000.
  • DestroyStreamPickup(ID);
    Destroys a StreamPickup. Duh!
  • ChangeStreamPickupModel(ID,newmodel); - v2
    Changes the model of the StreamPickup. ID = StreamPickup ID (returned by CreateStreamPickup() ) and newmodel= New StreamPickup model.
  • ChangeStreamPickupType(ID,newtype); - v2
    Changes the type of the StreamPickup. ID = StreamPickup ID (returned by CreateStreamPickup() ) and newtype= New StreamPickup type.
  • IsStreamPickup(ID); - v2
    Checks if Pickup is StreamPickup. ID = Pickup ID (not StreamPickup ID), returns StreamPickupID if pickup is StreamPickup and -1 if it isn't.
  • ValidStreamPickupPickUp(playerid, pickupid)(ID); - v3
    Used in OnPlayerPickUpStreamPickup callback. Fix for SA-MP pickup ID bug.


  • OnPlayerPickUpStreamPickup(playerid,pickupid); - v2
    Gets called when player picks up a StreamPickup.
Credit to Denver/Astro - For the PlayerToPoint function.

"Installing"
First you have to get the include. There is a link at the bottom of this thread to PasteBin. Copy what you see there to a new text file and save it as "erpPickupStreamer.inc" (make sure that extension is .inc) and save it to "pawno/include"
After that you need to make some modifications to the GameMode you are installing it to also.

Installing version 3:
Код:
// Add to the top of the gamemode
#include <erpPickupStreamer>
forward OnPlayerPickupStreamPickup(playerid,pickupid);
////////////////////////////////


public OnGameModeInit()
{
  // Add to OnGameModeInit callback
  SetTimer("StreamPickups",1000,1);
  /////////////////////////////////
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
  // Add to OnPlayerPickUpPickup callback
  new streampickupID;
  streampickupID = IsStreamPickup(pickupid);
  if( streampickupID >= 0 )
  {
    if( ValidStreamPickupPickUp(playerid, streampickupID) )
    {
      OnPlayerPickUpStreamPickup(playerid,streampickupID);
      return 1;
    }
    return 0;
  }
  ////////////////////////////////////////

  return 1;
}

// Add new OnPlayerPickUpStreamPickup to your gamemode,
// no matter where as long as it ain't inside any other function or callback.
public OnPlayerPickUpStreamPickup(playerid,pickupid)
{

  // Add whatever you want.
	  
  return 1;
}
////////////////////////////////////////////////////////
Installing version 2:
Код:
#include <erpPickupStreamer>
forward OnPlayerPickupStreamPickup(playerid,pickupid);

public OnGameModeInit()
{
	SetTimer("StreamPickups",1000,1);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
	new streampickupID;
	streampickupID = IsStreamPickup(pickupid);
	if( streampickupID >= 0 )
	{
		OnPlayerPickUpStreamPickup(playerid,streampickupID);
		return 1;
	}	
	return 1;
}
public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
	return 1;
}
Installing version 1:
Код:
#include <erpPickupStreamer>

public OnGameModeInit()
{
	SetTimer("StreamPickups",1000,1);
}
Reply


Messages In This Thread
[INC] eRP Pickup Streamer NOW VERSION 3! - by 13th - 03.12.2008, 23:32
Re: [INC] eRP Pickup Streamer - by 56avenue - 03.12.2008, 23:45
Re: [INC] eRP Pickup Streamer - by Pixels^ - 04.12.2008, 02:58
Re: [INC] eRP Pickup Streamer - by ToMmY1547 - 04.12.2008, 13:14
Re: [INC] eRP Pickup Streamer - by 13th - 04.12.2008, 20:40
Re: [INC] eRP Pickup Streamer - by Norn - 05.12.2008, 00:06
Re: [INC] eRP Pickup Streamer - by 13th - 06.12.2008, 11:51
Re: [INC] eRP Pickup Streamer - by Tez2k7 - 06.12.2008, 14:04
Re: [INC] eRP Pickup Streamer - by Zoopaman - 07.12.2008, 11:07
Re: [INC] eRP Pickup Streamer - by 13th - 07.12.2008, 19:16
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by LightFight™ - 07.12.2008, 19:30
Re: [INC] eRP Pickup Streamer - by Tez2k7 - 07.12.2008, 20:19
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by Lewwy - 07.12.2008, 20:26
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by 13th - 09.12.2008, 20:48
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by eddd3 - 21.12.2008, 04:31
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by eddd3 - 21.12.2008, 05:25
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by 13th - 30.12.2008, 18:16
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by [NL]Bank - 09.01.2009, 16:48
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by notec100 - 11.01.2009, 19:24
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by PlayboyX - 30.01.2009, 19:59
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by ^Woozie^ - 05.02.2009, 17:35
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by HolyShit - 19.02.2009, 07:13
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by Norn - 19.02.2009, 08:11
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by HolyShit - 19.02.2009, 15:26
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by c-middia - 19.02.2009, 21:21
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by Norn - 22.02.2009, 08:23
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by roland - 04.03.2009, 19:51
Re: [INC] eRP Pickup Streamer NOW VERSION 2! - by 13th - 11.03.2009, 22:47
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by KeyWay - 22.05.2009, 18:40
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by v0nz - 22.05.2009, 22:51
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Jakku - 03.08.2009, 11:09
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Agent Smith - 03.08.2009, 11:22
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Sergei - 03.08.2009, 11:36
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Agent Smith - 03.08.2009, 11:40
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by SiJ - 03.08.2009, 14:01
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by ғαιιοцт - 04.08.2009, 21:47
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by SiJ - 05.08.2009, 06:27
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by MaykoX - 08.08.2009, 11:14
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by SiJ - 11.08.2009, 12:53
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by DMSOrg - 31.10.2009, 22:49
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Sergei - 31.10.2009, 23:40
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by DMSOrg - 01.11.2009, 15:04
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Sergei - 01.11.2009, 15:25
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by DMSOrg - 01.11.2009, 16:54
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by FujiNNN - 17.03.2010, 23:36
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by SyNNN - 19.04.2010, 08:16
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by tackleza - 05.05.2010, 04:09
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Betamaster - 05.05.2010, 11:43
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by c-middia - 05.05.2010, 12:23
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by titanak - 20.06.2010, 11:45
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Grim_ - 20.06.2010, 11:47
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by titanak - 20.06.2010, 11:51
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by titanak - 20.06.2010, 11:57
Re: [INC] eRP Pickup Streamer NOW VERSION 3! - by Rachael - 05.07.2010, 17:58

Forum Jump:


Users browsing this thread: 1 Guest(s)