SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 13/04/2018, 10:48 PM   #29
BrunoBM23
Little Clucker
 
Join Date: Mar 2018
Posts: 17
Reputation: 22
Default Re: Pawn.RakNet

Quote:
Originally Posted by ball View Post
Here you go most of them: http://forum.sa-mp.com/showthread.php?t=649570
It is in spanish/portugese, I can't find this thread in english, although the most important info is readable.

Code:
ID_RCON_COMMAND (ID: 201)
text_length,
cmdtext
I also want to know how to get packet's data from ID_SPECTATOR_SYNC (212), but I can't find anything how to do it.
It's structure:

UINT16 - lrKey
UINT16 - udKey
UINT16 - keys
FLOAT - Position X
FLOAT - Position Y
FLOAT - Position Z

Anyway, the latest include file already has read/write functions for spectator sync packet (https://github.com/urShadow/Pawn.Rak...awn.RakNet.inc):

PHP Code:
enum PR_SpectatingSync
{
    
PR_lrKey,
    
PR_udKey,
    
PR_keys,
    
Float:PR_position[3]
};

stock BS_ReadSpectatingSync(BitStream:bsdata[PR_SpectatingSync])
{
    
BS_ReadValue(
        
bs,
        
PR_UINT16data[PR_lrKey],
        
PR_UINT16data[PR_udKey],
        
PR_UINT16data[PR_keys],
        
PR_FLOATdata[PR_position][0],
        
PR_FLOATdata[PR_position][1],
        
PR_FLOATdata[PR_position][2]
    );
}

stock BS_WriteSpectatingSync(BitStream:bsdata[PR_SpectatingSync])
{
    
BS_WriteValue(
        
bs,
        
PR_UINT16data[PR_lrKey],
        
PR_UINT16data[PR_udKey],
        
PR_UINT16data[PR_keys],
        
PR_FLOATdata[PR_position][0],
        
PR_FLOATdata[PR_position][1],
        
PR_FLOATdata[PR_position][2]
    );

BrunoBM23 is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Tutorial] Pacotes - Pawn.RakNet Jelly23 Lanamentos/Releases 32 10/02/2018 07:03 PM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Tutorials 6 29/01/2018 11:46 PM
[Tutorial] Handlers - Pawn.RakNet Jelly23 Lanamentos/Releases 14 02/01/2018 11:04 PM
[Tutorial] RPC - Pawn.RakNet Jelly23 Tutorials 21 13/12/2017 09:51 PM
[Tutorial] Packets - Pawn.RakNet Jelly23 Tutorials 2 16/11/2017 05:46 PM


All times are GMT. The time now is 02:30 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.