SA-MP Forums Archive
[Include] [INC] eRP Pickup Streamer NOW VERSION 3! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] [INC] eRP Pickup Streamer NOW VERSION 3! (/showthread.php?tid=57076)

Pages: 1 2 3


Re: [INC] eRP Pickup Streamer NOW VERSION 2! - ^Woozie^ - 05.02.2009

What about this?
http://forum.sa-mp.com/index.php?topic=69320.0

falsee

if( Pickup[i][pickupID] [b]= ID && Pickup[i][pickupCreated] == 1 )

true

if( Pickup[i][pickupID][b] == ID && Pickup[i][pickupCreated] == 1 )


Re: [INC] eRP Pickup Streamer NOW VERSION 2! - HolyShit - 19.02.2009

Код:
public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
	return 1  <<=== you forgot to add tag  ;
}
And how to fix this warning ?
Код:
(44970) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")
Код:
\pawno\include\erpPickupStreamer.inc(131) : warning 211: possibly unintended assignment



Re: [INC] eRP Pickup Streamer NOW VERSION 2! - Norn - 19.02.2009

Nice script buddy.


Re: [INC] eRP Pickup Streamer NOW VERSION 2! - HolyShit - 19.02.2009

How to fix thous warns


Re: [INC] eRP Pickup Streamer NOW VERSION 2! - c-middia - 19.02.2009

pawn Код:
forward OnPlayerPickUpStreamPickup(playerid, pickupid);
Quote:

falsee

if( Pickup[pickupID] = ID && Pickup[pickupCreated] == 1 )

true

if( Pickup[pickupID] == ID && Pickup[pickupCreated] == 1 )




Re: [INC] eRP Pickup Streamer NOW VERSION 2! - Norn - 22.02.2009

Here's a little function i whipped up that returns the amount of created pickups.

pawn Код:
public CountStreamPickups()
{
    new count = 0;
    for(new i = 0; i < MAX_PICKUPS; i++)
    {
      if(Pickup[i][pickupCreated] == 1)
      {
            count++;
      }
    }
    return count;
}



Re: [INC] eRP Pickup Streamer NOW VERSION 2! - roland - 04.03.2009

Quote:
Originally Posted by HolyShit
Код:
public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
	return 1 <<=== you forgot to add tag  ;
}
And how to fix this warning ?
Код:
(44970) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")
Код:
\pawno\include\erpPickupStreamer.inc(131) : warning 211: possibly unintended assignment
Change the OnPlayerPickUpStreamPickup(playerid,pickupid) Name (forward, public and call) into similar name like OnPlayerPickUpStreamerPickup(playerid,pickupid). I had the same probleme because i have more streamer in my inc folder of pawno ^^

But, i have a big problem with the id's.
Quote:

if (PickupID[temp]==streampickupID)

i get different id's back that were created. Why?


Re: [INC] eRP Pickup Streamer NOW VERSION 2! - 13th - 11.03.2009

Haven't been active in SA-MP forum lately, so.. sorry for not giving any support.
But now I have made a small update!
It's a simple (but pretty important) 1-line function that should be added to OnPlayerPickUpStreamPickup like shown in the first post.
It is the SA-MP pickup ID bugfix. Uses same method as the fix pointed out by Psycho.
Since there is not much to add to a simple pickup streamer, this update also gets its own version number

I have also fixed the warning in code, and added comments to v3 installation guide.


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - KeyWay - 22.05.2009

How could i use this for my houses? I mean i have like over 200 houses + maybe 200 other icons. And house icons are in "property.cfg" ...

1 house example:

Quote:

2652.800048,-1991.099975,13.500000,446.100006,507.899993,1001.4 00024,0,0,0,0,0,0,The State,2 Room Apartment,100000,0,0,12,1,0,1,666,1,77256,418,-1,-1,139,5,30




Re: [INC] eRP Pickup Streamer NOW VERSION 3! - v0nz - 22.05.2009

Soo many streamers.. nice job on this one.


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - Jakku - 03.08.2009

My pickups disappears when I use this, someone help me


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - Agent Smith - 03.08.2009

Quote:
Originally Posted by Jakku
My pickups disappears when I use this, someone help me
Same as


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - Sergei - 03.08.2009

Quote:
Originally Posted by samdudes01
Quote:
Originally Posted by Jakku
My pickups disappears when I use this, someone help me
Same as
It can be that you need to relog after creating new pickups (helps for me).


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - Agent Smith - 03.08.2009

What happends is sometimes I'll close down the server and then start it up again but they just aren't there


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - SiJ - 03.08.2009

When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  new streampickupID;
  streampickupID = IsStreamPickup(pickupid);
  if( streampickupID >= 0 )
  {
    if( ValidStreamPickupPickUp(playerid, streampickupID) )
    {
      OnPlayerPickUpStreamPickup(playerid,streampickupID);
      return 1;
    }
    return 0;
  }

  return 1;
}

public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
//PICKUPS Goes here (this stuff worked without streamer)
return 1;
}



Re: [INC] eRP Pickup Streamer NOW VERSION 3! - ғαιιοцт - 04.08.2009

Quote:
Originally Posted by Justas [SiJ
]
When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  new streampickupID;
  streampickupID = IsStreamPickup(pickupid);
  if( streampickupID >= 0 )
  {
    if( ValidStreamPickupPickUp(playerid, streampickupID) )
    {
      OnPlayerPickUpStreamPickup(playerid,streampickupID);
      return 1;
    }
    return 0;
  }

  return 1;
}

public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
//PICKUPS Goes here (this stuff worked without streamer)
return 1;
}
The same happens to me, the script seems to stop at ValidStreamPickupPickup


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - SiJ - 05.08.2009

Quote:
Originally Posted by °ғαιιοцт°
Quote:
Originally Posted by Justas [SiJ
]
When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?

pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  new streampickupID;
  streampickupID = IsStreamPickup(pickupid);
  if( streampickupID >= 0 )
  {
    if( ValidStreamPickupPickUp(playerid, streampickupID) )
    {
      OnPlayerPickUpStreamPickup(playerid,streampickupID);
      return 1;
    }
    return 0;
  }

  return 1;
}

public OnPlayerPickUpStreamPickup(playerid,pickupid)
{
//PICKUPS Goes here (this stuff worked without streamer)
return 1;
}
The same happens to me, the script seems to stop at ValidStreamPickupPickup
SO maybe ValidStreamPickupPickUp can be removed? Cause my all pickups are streamed so there is no reason to check if pickup is streamed....


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - MaykoX - 08.08.2009

WOW Thankssssssssssssssssssssss I LOVE IT


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - SiJ - 11.08.2009

Now seriously, how can I get this to work? I can stand on pickup and it doesn't do anything.. :S


Re: [INC] eRP Pickup Streamer NOW VERSION 3! - DMSOrg - 31.10.2009

Hiya. Little friendly 3 month bump here.

I am using Carlito's Roleplay in my server, which contains the pickup streamer released here. I'm having a bit of a complex problem. You see, I'd like to make certain pickups (in a dynamic house system) only appear in certain virtual worlds. While proven functional, I don't seem to catch the logic in this code.

pawn Код:
//===========================================[PICKUP STREAMER]==========================================================

public CreateStreamPickup(model,type,Float:x,Float:y,Float:z,range)
{
    new FoundID = 0;
    new ID;

    for ( new i = 0; FoundID <= 0 ; i++)
    {
      if( Pickup[i][pickupCreated] == 0 )
      {
        if( FoundID == 0 )
        {
          ID = i;
          FoundID = 1;
        }
      }
      if( i > MAX_PICKUPS )
      {
          FoundID = 2;
        }
    }
    if( FoundID == 2 )
    {
      print("Pickup limit reached! Pickup not created!");
      return -1;
    }
    Pickup[ID][pickupCreated] = 1;
    Pickup[ID][pickupVisible] = 0;
    Pickup[ID][pickupModel] = model;
    Pickup[ID][pickupType] = type;
    Pickup[ID][pickupX] = x;
    Pickup[ID][pickupY] = y;
    Pickup[ID][pickupZ] = z;
    Pickup[ID][pickupRange] = range;
    return ID;

}
public DestroyStreamPickup(ID)
{
    if(Pickup[ID][pickupCreated])
    {
        DestroyPickup(Pickup[ID][pickupID]);
        Pickup[ID][pickupCreated] = 0;
        return 1;
    }
    return 0;
}
public CountStreamPickups()
{
    new count = 0;
    for(new i = 0; i < MAX_PICKUPS; i++)
    {
      if(Pickup[i][pickupCreated] == 1)
      {
            count++;
      }
    }
    return count;
}
public StreamPickups()
{
    for(new i = 0; i < MAX_PICKUPS; i++)
    {
      if(Pickup[i][pickupCreated] == 1)
      {
            if(Pickup_AnyPlayerToPoint(Pickup[i][pickupRange],Pickup[i][pickupX],Pickup[i][pickupY],Pickup[i][pickupZ]))
            {
              if(Pickup[i][pickupVisible] == 0)
              {
                Pickup[i][pickupID] = CreatePickup(Pickup[i][pickupModel],Pickup[i][pickupType],Pickup[i][pickupX],Pickup[i][pickupY],Pickup[i][pickupZ]);
                Pickup[i][pickupVisible] = 1;
                }
            }
            else
            {
              if(Pickup[i][pickupVisible] == 1)
              {
                DestroyPickup(Pickup[i][pickupID]);
                    Pickup[i][pickupVisible] = 0;
              }
            }
      }
    }
}
public MoveStreamPickup(ID,Float:x,Float:y,Float:z)
{
    if(Pickup[ID][pickupCreated])
    {
      DestroyPickup(Pickup[ID][pickupID]);
      Pickup[ID][pickupVisible] = 0;
        Pickup[ID][pickupX] = x;
        Pickup[ID][pickupY] = y;
        Pickup[ID][pickupZ] = z;
        return 1;
    }
    return 0;
}
public ChangeStreamPickupModel(ID,newmodel)
{
  if(Pickup[ID][pickupCreated])
    {
      DestroyPickup(Pickup[ID][pickupID]);
      Pickup[ID][pickupVisible] = 0;
        Pickup[ID][pickupModel] = newmodel;
        return 1;
    }
    return 0;
}
public ChangeStreamPickupType(ID,newtype)
{
  if(Pickup[ID][pickupCreated])
    {
      DestroyPickup(Pickup[ID][pickupID]);
      Pickup[ID][pickupVisible] = 0;
        Pickup[ID][pickupType] = newtype;
        return 1;
    }
    return 0;
}
public Pickup_AnyPlayerToPoint(Float:radi, Float:x, Float:y, Float:z)
{
    for (new i = 0; i < MAX_PLAYERS; i++)
    {
      if(IsPlayerConnected(i))
        {
            new Float:oldposx, Float:oldposy, Float:oldposz;
            new Float:tempposx, Float:tempposy, Float:tempposz;
            GetPlayerPos(i, oldposx, oldposy, oldposz);
            tempposx = (oldposx -x);
            tempposy = (oldposy -y);
            tempposz = (oldposz -z);
            if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
            {
                return 1;
            }
        }
    }
  return 0;
}
Can anyone help me out here?