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

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

OnPlayerUpdate is called once every second... a timer loop is better to conserve system resources.
Reply
#43

Quote:
Originally Posted by [K4L
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.
Reply
#44

I hate to be so easy to think I'm wrong but you do have a point
Reply
#45

pawn Код:
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.
Reply
#46

Quote:

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 © 1997-2006, ITB CompuPhase


3 Errors.

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

Sorry for my english i'm romanian
Reply
#47

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 © 1997-2006, ITB CompuPhase


1 Warning.

Help Please I Don't Like Warning
Reply
#48

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

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

help

.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 © 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 © 1997-2006, ITB CompuPhase


1 Error.
Reply
#51

You don't compile and include file.
Reply
#52

what about Gamemode errors ?
Reply
#53

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 © 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.
Reply
#54

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


Forum Jump:


Users browsing this thread: 11 Guest(s)