PDA

View Full Version : [Include] [INC] eRP Pickup Streamer NOW VERSION 3!


13th
04/12/2008, 12:32 AM
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:x,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);
}




eRP Pickup Streamer v3 (http://pastebin.com/f155d9c3f)
eRP Pickup Streamer v2 (http://pastebin.com/f36b1f54f)
eRP Pickup Streamer v1 (http://pastebin.com/f68eade90)

56avenue
04/12/2008, 12:45 AM
Nice work ;)

Y_Less
04/12/2008, 12:57 AM
If anyone knows some.. nicer place to upload small files like these then let me know!
(There MUST be some without million ads and decent speed!?)[/center]


pastebin

Pixels^
04/12/2008, 03:58 AM
You might want to give credit to Denver/Astro for the actual workings of the PlayerToPoint function.

ToMmY1547
04/12/2008, 02:14 PM
what is range?

13th
04/12/2008, 09:40 PM
You might want to give credit to Denver/Astro for the actual workings of the PlayerToPoint function.

I will do that.

what is range?

Range is the maximum distance from the pickup location where player needs to be for the pickup to be created.
For example if range = 10 then the pickup wont be visible unless some player is 10 coordinates or less away from it.

Norn
05/12/2008, 01:06 AM
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.

It has 2 functions:

CreateStreamPickup(model,type,Float:x,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!


Credit to Denver/Astro - For the PlayerToPoint function.

"Installing"
You need to include the include.. which is kinda logical.
You also need to add timer to your OnGameModeInit() callback. Like this:

#include <erpPickupStreamer>

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


PASTEBIN (http://pastebin.com/f68eade90)
DOWNLOAD (http://www.filedropper.com/erppickupstreamer)-FileDropper
MIRROR (http://www.mediafire.com/?zzj5fnigizq)-MediaFire



Suggestion, OnPlayerPickupStreamPickup

13th
06/12/2008, 12:51 PM
Suggestion, OnPlayerPickupStreamPickup

Hmm.. then I would probably have to make it as filterscript. But I will think about it.. and probably do it sometime :) Thanks for the suggestion.

Tez2k7
06/12/2008, 03:04 PM
Nice release. ;)
I'm currently about 20 pickups under the limit so maybe I'll have to use this. xD

Zoopaman
07/12/2008, 12:07 PM
It's nice, but could you make a ChangePickupType function pls?

13th
07/12/2008, 08:16 PM
New release!
And since there is not much to change or add to pickup streamer I might as well call it "version 2".

New:
ChangeStreamPickupModel(ID,newmodel)
ChangeStreamPickupType(ID,newtype)
IsStreamPickup(ID)
OnPlayerPickUpStreamPickup(playerid,pickupid)

LightFight™
07/12/2008, 08:30 PM
Nice Work ! :D

Tez2k7
07/12/2008, 09:19 PM
New release!
And since there is not much to change or add to pickup streamer I might as well call it "version 2".

New:
ChangeStreamPickupModel(ID,newmodel)
ChangeStreamPickupType(ID,newtype)
IsStreamPickup(ID)
OnPlayerPickUpStreamPickup(playerid,pickupid)



Nice updated release.

Lewwy
07/12/2008, 09:26 PM
Cool!
Lovin' the update.

13th
09/12/2008, 09:48 PM
Thanks everyone :)

Can someone confirm the new version 2 stuff is working like it should?

EDIT:
I just noticed that the link to v2 was actually pointing to v1. I don't know.. should I be happy or sad because no one noticed?
Anyway. It's fixed now.

eddd3
21/12/2008, 05:31 AM
hm could somebody tell me what 'could' be wrong?

erpPickupStreamer.inc(131) : warning 211: possibly unintended assignment

eddd3
21/12/2008, 06:25 AM
oh nvm found a way around

13th
30/12/2008, 07:16 PM
Yeah, there was 2 warnings in there. One was because I forgot one = in IF statment, just make "=" into "==". And the other one I don't remember.

[NL]Bank
09/01/2009, 05:48 PM
nice script. :)

notec100
11/01/2009, 08:24 PM
Ok so I am using version 2 and I have followed all install instructions and everything works correctly, except when I enter into and interior, you either enter into the correct one and then become stuck or you'll enter one point and end up at another. Why does this keep happening? Is there a certain way other than example:
variable = CreateStreamPickup(model, type, x, y, z, range) to define the stream pickup id? Help is greatly appreciated as I don't want to wait forever to get scripting.. Thank you.

PlayboyX
30/01/2009, 08:59 PM
yes

^Woozie^
05/02/2009, 06:35 PM
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 )

HolyShit
19/02/2009, 08:13 AM
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

Norn
19/02/2009, 09:11 AM
Nice script buddy.

HolyShit
19/02/2009, 04:26 PM
How to fix thous warns

c-middia
19/02/2009, 10:21 PM
forward OnPlayerPickUpStreamPickup(playerid, pickupid);

falsee

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

true

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

Norn
22/02/2009, 09:23 AM
Here's a little function i whipped up that returns the amount of created pickups.

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

roland
04/03/2009, 08:51 PM
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.
if (PickupID[temp]==streampickupID) i get different id's back that were created. Why?

13th
11/03/2009, 10:47 PM
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.

KeyWay
22/05/2009, 06:40 PM
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:

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

v0nz
22/05/2009, 10:51 PM
Soo many streamers.. nice job on this one.

KeyWay
23/05/2009, 10:57 AM
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:

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



Anyone?

Klid
17/06/2009, 09:36 AM
big big problem i need help with please


CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 1*/
CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 2*/

public OnPlayerPickUpStreamPickup(playerid, pickupid)
{
if(pickupid)== 0)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code")
}

if(pickupid == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code");
}

return 1;
}

only pickupid 0 works...

Slice
17/06/2009, 01:21 PM
big big problem i need help with please


CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 1*/
CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 2*/

public OnPlayerPickUpStreamPickup(playerid, pickupid)
{
if(pickupid)== 0)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code")
}

if(pickupid == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code");
}

return 1;
}

only pickupid 0 works...


Don't use 0 and 1, save the pickupid's in variable that you then read, for example:

// Outside any function
new myPickup1, myPickup2;
// -----------------
myPickup1 = CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 1*/
myPickup2 = CreateStreamPickup(1239, 23, MY, CODE, COORD, PICKUP_RANGE); /* Code 2*/

public OnPlayerPickUpStreamPickup(playerid, pickupid)
{
if(pickupid== myPickup1)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code")
}

if(pickupid == myPickup2)
{
SendClientMessage(playerid, COLOR_WHITE, "--------------------------------------------------------------");
SendClientMessage(playerid, COLOR_GREEN, "Code");
}

return 1;
}

Anyways, the problem is most likely this:
if(pickupid)== 0)
It should be:
if(pickupid== 0)

I might add that I didn't read any earlier posts and I have never used this streamer system.

I own all
20/06/2009, 07:20 AM
Got a Bug , It Might Just Be My Script , But If I Touch a Teleport Pickup , It Teleports me , But If I Touch a Non-Teleport Pickup , and then touch the teleport pickup again nothing happens.

ғαιιοцт
24/07/2009, 09:24 AM
ValidStreamPickupPickUp
always seems to return 0 for me.. so nothing happens when I walk over a pickup

SiJ
01/08/2009, 08:37 PM
I have this warning and don't know how to fix..

warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")

I tried changing forward, callback and function called in OnPlayerPickUpPickup but I still get this... I don't use any other pickup streamers...

Sergei
01/08/2009, 09:34 PM
]
I have this warning and don't know how to fix..

warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")

I tried changing forward, callback and function called in OnPlayerPickUpPickup but I still get this... I don't use any other pickup streamers...

Problem is simple.
OnPlayerPickupStreamPickup(playerid,pickupid);
OnPlayerPickUpStreamPickup(playerid,streampickupID );
OnPlayerPickUpStreamPickup(playerid,pickupid)
Just watch out on capital Up, so change all three to 'up' or to 'Up'.

RyDeR`
02/08/2009, 10:55 AM
OMG I needed this thank you I'll directly use this. >:D

SiJ
02/08/2009, 04:34 PM
]
I have this warning and don't know how to fix..

warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")

I tried changing forward, callback and function called in OnPlayerPickUpPickup but I still get this... I don't use any other pickup streamers...

Problem is simple.
OnPlayerPickupStreamPickup(playerid,pickupid);
OnPlayerPickUpStreamPickup(playerid,streampickupID );
OnPlayerPickUpStreamPickup(playerid,pickupid)
Just watch out on capital Up, so change all three to 'up' or to 'Up'.

Thanks.. :)

nuriel8833
02/08/2009, 07:34 PM
tanks
maybe im gonna use it

Jakku
03/08/2009, 11:09 AM
My pickups disappears when I use this, someone help me :D

Agent Smith
03/08/2009, 11:22 AM
My pickups disappears when I use this, someone help me :D


Same as :s

Sergei
03/08/2009, 11:36 AM
My pickups disappears when I use this, someone help me :D


Same as :s

It can be that you need to relog after creating new pickups (helps for me).

Agent Smith
03/08/2009, 11:40 AM
What happends is sometimes I'll close down the server and then start it up again but they just aren't there :roll:

SiJ
03/08/2009, 02:01 PM
When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?


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;
}

ғαιιοцт
04/08/2009, 09:47 PM
]
When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?


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

SiJ
05/08/2009, 06:27 AM
]
When I step on my pickups nothing happens... :S
It seems that OnPlayerPickUpPickup doesn't get called... why?


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....

MaykoX
08/08/2009, 11:14 AM
WOW Thankssssssssssssssssssssss I LOVE IT

SiJ
11/08/2009, 12:53 PM
Now seriously, how can I get this to work? I can stand on pickup and it doesn't do anything.. :S

DMSOrg
31/10/2009, 10:49 PM
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.


//===========================================[PICKUP STREAMER]================================================== ========

public CreateStreamPickup(model,type,Float:x,Float:y,Floa t: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?

Sergei
31/10/2009, 11:40 PM
This streamer needs complete update since it should also use new IsPlayerInRangeOfPoint instead of PlayerToPoint and OnPlayerUpdate to stream pickups instead of timer loop.
Pickup IDs are also fixed now, so no need to additional checks.

DMSOrg
01/11/2009, 04:04 PM
OnPlayerUpdate is called once every second... a timer loop is better to conserve system resources.

Sergei
01/11/2009, 04:25 PM
Jake ]
OnPlayerUpdate is called once every second... a timer loop is better to conserve system resources.

That's why we use OnPlayerUpdate as a tick function. And OnPlayerUpdate is called not only ones, but ~54 times per second. And timer loop isn't better because server needs to loop over all players and pickups in that short time what is worse than looping only over pickups for specific players.

DMSOrg
01/11/2009, 05:54 PM
I hate to be so easy to think I'm wrong but you do have a point :s

FujiNNN
17/03/2010, 11:36 PM
D:\SERVER\gamemodes\gf.pwn(113) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

SyNNN
19/04/2010, 08:16 AM
C:\DOCUME~1\Silviu\Desktop\BULLET~1.5\GAMEMO~1\lsr p.pwn(4337) : error 004: function "OnPlayerPickUpStreamPickup" is not implemented
C:\DOCUME~1\Silviu\Desktop\BULLET~1.5\GAMEMO~1\lsr p.pwn(36140) : error 055: start of function body without function header
C:\DOCUME~1\Silviu\Desktop\BULLET~1.5\GAMEMO~1\lsr p.pwn(36141) : error 010: invalid function or declaration
C:\DOCUME~1\Silviu\Desktop\BULLET~1.5\GAMEMO~1\lsr p.pwn(36143) : warning 203: symbol is never used: "GetPointDistanceToPointExMorph"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

I have some problems with this, can same body help me

Sorry for my english i'm romanian

tackleza
05/05/2010, 04:09 AM
D:\Software\samp03asvr_R3_win32\pawno\include\Pick up.inc(3) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

Help Please I Don't Like Warning :roll:

Betamaster
05/05/2010, 11:43 AM
This include is somewhat outdated with respect to SA-MP 0.3, however...

@ tackleza, FujiNNN
Regarding warning redefinition of constant/macro (symbol "MAX_PICKUPS"), you should find and replace MAX_PICKUPS in the eRP include with something like MAX_STREAM_PICKUPS. This include has a_samp.inc included and both have MAX_PICKUPS defined, so you will need to change one of these definitions (don't update a_samp.inc).

@ SyNNN
You need to define the OnPlayerPickUpPickup function yourself. Refer to the original thread post with the "installing" instructions.

c-middia
05/05/2010, 12:23 PM
public Pickup_AnyPlayerToPoint(Float:radi, Float:x, Float:y, Float:z)
{
foreach (Player, i)
{


if(IsPlayerInRangeOfPoint(i, radi, x, y, z))
{
return 1;
}

}
return 0;
}
small update XD

titanak
20/06/2010, 11:45 AM
help:D

.inc compiled:


C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(3) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.


my gamemode compiled:

C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(3) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(29) : warning 219: local variable "range" shadows a variable at a preceding level
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(61) : warning 213: tag mismatch
C:\Users\Kalvi\Desktop\KFS Fun Server EST\gamemodes\kfsr4v2.pwn(2145) : error 017: undefined symbol "OnPlayerPickUpStreamPickup"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

Grim_
20/06/2010, 11:47 AM
You don't compile and include file.

titanak
20/06/2010, 11:51 AM
what about Gamemode errors :D ?

titanak
20/06/2010, 11:57 AM
do i have to just stay those warnings -.- ?



C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(3) : warning 201: redefinition of constant/macro (symbol "MAX_PICKUPS")
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(30) : warning 219: local variable "range" shadows a variable at a preceding level
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(62) : warning 213: tag mismatch
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(90) : warning 217: loose indentation
C:\Users\Kalvi\Desktop\KFS Fun Server EST\pawno\include\erpPickupStreamer.inc(105) : warning 217: loose indentation
C:\Users\Kalvi\Desktop\KFS Fun Server EST\gamemodes\kfsr4v2.pwn(11971) : warning 235: public function lacks forward declaration (symbol "OnPlayerPickUpStreamPickup")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Header size: 6528 bytes
Code size: 612560 bytes
Data size: 1339016 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 1974488 bytes

6 Warnings.

Rachael
05/07/2010, 05:58 PM
It has been said that one should reduce MAX_PICKUPS to conserve server resources, is it better to change the define in the include, or to #undef and #define MAX_PICKUPS in the gamemode?

or does it make no difference?