[Tutorial] Handlers - Pawn.RakNet
#7

Quote:
Originally Posted by Dayrion
View Post
Useful to note you can assign multiple id to one handler.
Simple exemple: OnActorStateChange is called when a actor is streamed in or out for a player.
PHP Code:
PR_RegHandler(0xAB"OnActorStateChange"PR_OUTCOMING_RPC); 
PR_RegHandler(0xAC"OnActorStateChange"PR_OUTCOMING_RPC); 
Yes, you can have a single callback for different handlers, but I wouldn't recommend it.

A handler callback has only two parameters: one for the player id and another one for the BitStream. There is no way you could identify which RPC/Packet called that callback, unless you compare the length in bits of the stream, by using BS_GetNumberOfBitsUsed.
Reply


Messages In This Thread
Handlers - Pawn.RakNet - by Jelly23 - 30.12.2017, 19:26
Re: Handlers - Pawn.RakNet - by RIDE2DAY - 01.01.2018, 12:30
Re: Handlers - Pawn.RakNet - by rfr - 01.01.2018, 19:07
Re: Handlers - Pawn.RakNet - by RogueDrifter - 01.01.2018, 19:21
Re: Handlers - Pawn.RakNet - by kurta999 - 01.01.2018, 19:28
Re: Handlers - Pawn.RakNet - by Dayrion - 29.01.2018, 23:09
Re: Handlers - Pawn.RakNet - by Jelly23 - 29.01.2018, 23:46

Forum Jump:


Users browsing this thread: 1 Guest(s)