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

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 )
Reply
#22

Код:
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
Reply
#23

Nice script buddy.
Reply
#24

How to fix thous warns
Reply
#25

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

falsee

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

true

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

Reply
#26

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;
}
Reply
#27

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?
Reply
#28

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.
Reply
#29

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

Reply
#30

Soo many streamers.. nice job on this one.
Reply
#31

My pickups disappears when I use this, someone help me
Reply
#32

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

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).
Reply
#34

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

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;
}
Reply
#36

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
Reply
#37

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....
Reply
#38

WOW Thankssssssssssssssssssssss I LOVE IT
Reply
#39

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

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?
Reply


Forum Jump:


Users browsing this thread: 15 Guest(s)