[Plugin] RPG - HUD - RAK
#1

RAK

Hi,
First of all I hope it will get approved, because it is far less intruding than YSF plugin and much easier to update if there will be such a need (just a few offsets, no memory addresses, working without update since 0.3x for now).

With this plugin you can do this:
[ame]http://www.youtube.com/watch?v=FeWFyfkX1WE[/ame]

There are 3 include files. Include RAK.inc for networ engine functions, RPG.inc for RPG and RAKTOOLS.inc for HUD/Widescreen/Cutscene mode.


The RAK.inc functions (plugin):

Код:
native BitStream:InitBitStream();
native WriteToBitStream(BitStream:stream, type, {Float,_}:...);
native ReleaseBitStream(BitStream:stream);
native SendRPC(playerid, RPC, BitStream:stream);
native SendRPCToAll(RPC, BitStream:stream);
native SendData(playerid, BitStream:stream);
native SendDataToAll(BitStream:stream);
native AddTickSignal(index);
native RemoveTickSignal(index);

enum
{
	BS_BOOL,
	BS_CHAR,
	BS_UCHAR,
	BS_SHORT,
	BS_USHORT,
	BS_INT,
	BS_UINT,
	BS_FLOAT,
	BS_STRING,
	BSC_BOOL,
	BSC_CHAR,
	BSC_UCHAR,
	BSC_SHORT,
	BSC_USHORT,
	BSC_INT,
	BSC_UINT,
	BSC_FLOAT,
	BSC_STRING,
	BS_NQUAT,
	BS_VECTOR,
	BS_ARRAY_BYTE,
	BS_ARRAY_WORD,
	BS_ARRAY_DWORD
};
Well, I think if you are interested in this the names speak for themselves. You can send RPC/Packets to client with this.
Example usage:
Код:
#define RPC_WorldPlayerAdd 32
#define RPC_WorldPlayerRemove 163
#define RPC_ServerJoin 137
#define RPC_ServerQuit 138
#define ID_PLAYER_SYNC 212
#define ID_AIM_SYNC 218

forward Timer_FreeSlot(slot);
public Timer_FreeSlot(slot)
{
	if (!IsPlayerConnected(slot))
	{
		new BitStream:stream;

		stream = InitBitStream();
	    WriteToBitStream(stream, BS_SHORT, slot);
	    SendRPCToAll(RPC_WorldPlayerRemove, stream);
		ReleaseBitStream(stream);

		stream = InitBitStream();
	    WriteToBitStream(stream, BS_SHORT, slot);
		WriteToBitStream(stream, BS_CHAR, 0);
	    SendRPCToAll(RPC_ServerQuit, stream);
		ReleaseBitStream(stream);

		FreeSlot(slot);
	}
}

...
...

new BitStream:bsJoin, BitStream:bsAdd, BitStream:bsOnFoot, BitStream:bsAim, slot, Float:rot[3];

GetRotFromQuat(quat, rot[0], rot[1], rot[2]);

bsJoin = InitBitStream();
WriteToBitStream(bsJoin, BS_SHORT, slot);
WriteToBitStream(bsJoin, BS_INT, -1); //unknown
WriteToBitStream(bsJoin, BS_UCHAR, 1); //isNPC
WriteToBitStream(bsJoin, BS_UCHAR, 0); //nameLen

bsAdd = InitBitStream();
WriteToBitStream(bsAdd, BS_SHORT, slot);
WriteToBitStream(bsAdd, BS_CHAR, -1); //team
WriteToBitStream(bsAdd, BS_INT, skinId); //skin
WriteToBitStream(bsAdd, BS_FLOAT, vecFrom[0]);
WriteToBitStream(bsAdd, BS_FLOAT, vecFrom[1]);
WriteToBitStream(bsAdd, BS_FLOAT, vecFrom[2]);
WriteToBitStream(bsAdd, BS_FLOAT, rot[0]); //facingAngle
WriteToBitStream(bsAdd, BS_UINT, 0); //color
WriteToBitStream(bsAdd, BS_UCHAR, 0); //fightingStyle
static unkArray[11] = {0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8, 0xC8};
WriteToBitStream(bsAdd, BS_ARRAY_WORD, unkArray, sizeof(unkArray));

bsOnFoot = InitBitStream();
WriteToBitStream(bsOnFoot, BS_UCHAR, ID_PLAYER_SYNC); //PacketID
WriteToBitStream(bsOnFoot, BS_SHORT, slot); //playerId
WriteToBitStream(bsOnFoot, BS_BOOL, true); //hasLR
WriteToBitStream(bsOnFoot, BS_SHORT, 0); //lrAnalog
WriteToBitStream(bsOnFoot, BS_BOOL, true); //hasUD
WriteToBitStream(bsOnFoot, BS_SHORT, 0); //udAnalog
WriteToBitStream(bsOnFoot, BS_SHORT, 4 | 128); //keys

WriteToBitStream(bsOnFoot, BS_FLOAT, vecFrom[0]);
WriteToBitStream(bsOnFoot, BS_FLOAT, vecFrom[1]);
WriteToBitStream(bsOnFoot, BS_FLOAT, vecFrom[2]);

WriteToBitStream(bsOnFoot, BS_NQUAT, quat); //quat
WriteToBitStream(bsOnFoot, BS_UCHAR, -1); //health/armour
WriteToBitStream(bsOnFoot, BS_UCHAR, 35); //weapon
WriteToBitStream(bsOnFoot, BS_UCHAR, 0); //specialAction

WriteToBitStream(bsOnFoot, BS_VECTOR, vecSpeed); //moveSpeed
WriteToBitStream(bsOnFoot, BS_BOOL, false); //hasSurfInfo
WriteToBitStream(bsOnFoot, BS_BOOL, false); //hasAnimation
//WriteToBitStream(bsOnFoot, BS_INT, 0x800404A5); //animation

bsAim = InitBitStream();
WriteToBitStream(bsAim, BS_UCHAR, ID_AIM_SYNC); //PacketID
WriteToBitStream(bsAim, BS_SHORT, slot); //playerId
WriteToBitStream(bsAim, BS_UCHAR, 8); //CamMode
WriteToBitStream(bsAim, BS_FLOAT, vecAim[0]); //AimF1.X
WriteToBitStream(bsAim, BS_FLOAT, vecAim[1]); //AimF1.Y
WriteToBitStream(bsAim, BS_FLOAT, vecAim[2]); //AimF1.Z
WriteToBitStream(bsAim, BS_FLOAT, vecFrom[0]);
WriteToBitStream(bsAim, BS_FLOAT, vecFrom[1]);
WriteToBitStream(bsAim, BS_FLOAT, vecFrom[2]);
WriteToBitStream(bsAim, BS_FLOAT, 0); //fAimZ
WriteToBitStream(bsAim, BS_UCHAR, 0xFF); //ExtZoom : 6 / weapoonState : 2
WriteToBitStream(bsAim, BS_UCHAR, 0);

for (new i = 0; i < (MAX_SLOTS - 4); i++)
{
	if (IsPlayerConnected(i))
	{
		if (worldId == -1 || (GetPlayerVirtualWorld(i) == worldId))
		{
			if (interiorId == -1 || (GetPlayerInterior(i) == interiorId))
			{
				if (GetPlayerDistanceFromPoint(i, vecFrom[0], vecFrom[1], vecFrom[2]) <= stream_distance)
				{
					SendRPC(i, RPC_ServerJoin, bsJoin);
					SendRPC(i, RPC_WorldPlayerAdd, bsAdd);
					SendData(i, bsOnFoot);
					SendData(i, bsAim);
				}
			}
		}
	}
}

ReleaseBitStream(bsJoin);
ReleaseBitStream(bsAdd);
ReleaseBitStream(bsOnFoot);
ReleaseBitStream(bsAim);
...
...
Currently supported version is 0.3z. I have not updated this plugin since 0.3x, so I hope it will work in 0.3.7, but these things here in PAWN:
Код:
#define RPC_WorldPlayerAdd 32
#define RPC_WorldPlayerRemove 163
#define RPC_ServerJoin 137
#define RPC_ServerQuit 138
#define ID_PLAYER_SYNC 212
#define ID_AIM_SYNC 218
need to be updated from version to version, like from 0.3x to 0.3z.
The minor updates like from 0.3z to 0.3z-R2 should not affect these.

RAK plugin only gives access to network engine (and only for sending data), so it doesn't relay on any
memory addresses like kurta999's one, but it still can stop working if major change in structures will happen (I think I probably will have to update it for 0.3.7, not sure).

And...
Код:
native AddTickSignal(index);
native RemoveTickSignal(index);
Honestly I don't remember what these do.

The RPG.inc functions:
Код:
RPG_FireAimQuat(Float:vecFrom[3], Float:vecAim[3], Float:quat[4], Float:vecSpeed[3], skinId = 0, liveTime = 1000, worldId = -1, interiorId = -1, Float:stream_distance = 300.0);
RPG_FireQuat(Float:vecPos[3], Float:quat[4], Float:vecSpeed[3], skinId = 0, liveTime = 1000, worldId = -1, interiorId = -1, Float:stream_distance = 300.0);
RPG_FireAim(Float:vecFrom[3], Float:vecAim[3], Float:vecSpeed[3], skinId = 0, liveTime = 1000, worldId = -1, interiorId = -1, Float:stream_distance = 300.0);
RPG_FireFromTo(Float:vecFrom[3], Float:vecTo[3], Float:vecSpeed[3], skinId = 0, liveTime = 1000, worldId = -1, interiorId = -1, Float:stream_distance = 300.0);
RPG_FireRot(Float:vecPos[3], Float:vecSpeed[3], Float:vecRot[3], skinId = 0, liveTime = 1000, worldId = -1, interiorId = -1, Float:stream_distance = 300.0);
RPG_Fire(playerid);
vecFrom/vecPos - start position
vecTo - end position (where NPC should aim at)
vecAim - the aim vector determines missle direction (where NPC should aim)
quat - the Quaternion/orientation of NPC
vecSpeed - the 3D vector speed of NPC
skinId - the skin identifier of NPC
liveTime - how long should NPC live in ms - this value should always be >= 1000ms otherwise it won't shoot any rocket (could not make it in time)
worldId - determines in which virtual world you want to sync RPG (-1 = all)
interiorId - determines in which interior you want to sync RPG (-1 = all)
stream_distance - stream distance of RPG

RPG_Fire(playerid) - does the thing from *******.

The RAKTOOLS.inc functions:
Код:
stock TogglePlayerHUD(playerid, bool:toggle)
Activates widescreen/cutscene mode and disables player HUD (also player can't go to main menu). If player plays with 16:9 (1080p, 720p) aspect ratio
then this doesn't add black bars bottom/top, just hides HUD. This option may not work in future samp versions.

Important:
RAK plugin just provides access to network engine. All the logic for RPG was written in PAWN and you can modify RPG.inc (it also includes static math functions) or create
new functions.

Download (Plugin source + includes + Windows & Linux x32 binaries):
http://www.mediafire.com/download/7d...lney8fv/RPG.7z
Reply
#2

Interesting i'll test it later.
Reply
#3

What's that HUD function? It really hides player HUD? But the screen become strange, is there any way to disable the screen resolution change? This plugin is client-sided?
Reply
#4

Very nice
Reply
#5

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
What's that HUD function? It really hides player HUD? But the screen become strange, is there any way to disable the screen resolution change? This plugin is client-sided?
This plugin is only server sided. That hud function activates cutscene mode. If you have 16:9 aspect ratio like 1080p/720p you shouldn't see these black bars.
Reply
#6

Quote:
Originally Posted by bartekdvd
Посмотреть сообщение
This plugin is only server sided. That hud function activates cutscene mode. If you have 16:9 aspect ratio like 1080p/720p you shouldn't see these black bars.
hmmm nice, never saw a plugin like this before, the black bars stuff is strange while playing with non-HD (as most sa-mp players do), but i'll test this. Congrats for your job, +4 reps.
Reply
#7

Ahh I love it. Even though I'm not using a widescreen, it's pretty badass. I don't mind the bars, but wouldn't cutscene mode alter TextDraw positions?
Reply
#8

Quote:
Originally Posted by Crayder
Посмотреть сообщение
Ahh I love it. Even though I'm not using a widescreen, it's pretty badass. I don't mind the bars, but wouldn't cutscene mode alter TextDraw positions?
No, i tested it right now and it don't, the only thing which changes textdraw positions is the resolution, i loved it too, we finally can hide the hud!

@Edit: Is there any way to force players go to ESC Menu using RPC?
Reply
#9

Quote:
Originally Posted by ipsLeon
Посмотреть сообщение
@Edit: Is there any way to force players go to ESC Menu using RPC?
I'm not sure. I don't remember, but I think no. You can always try sending random RPC/Packets with random BitStream data and length and see what will happen in your game, maybe there is some hidden function like that. The range of RPC IDs is from 0 to 255, same thing for packets, so not so many.
Reply
#10

Quote:
Originally Posted by bartekdvd
Посмотреть сообщение
I'm not sure. I don't remember, but I think no. You can always try sending random RPC/Packets with random BitStream data and length and see what will happen in your game, maybe there is some hidden function like that. The range of RPC IDs is from 0 to 255, same thing for packets, so not so many.
Sure, i'll search for something.

@removed, thanks Kurta
Reply
#11

Don't waste your time, this from raksamp:

Packet IDs:
pawn Code:
enum PacketEnumeration : unsigned char
{
    ID_PLAYER_SYNC = 212,
    ID_MARKERS_SYNC = 213,
    ID_UNOCCUPIED_SYNC = 214,
    ID_TRAILER_SYNC = 215,
    ID_PASSENGER_SYNC = 216,
    ID_SPECTATOR_SYNC = 217,
    ID_AIM_SYNC = 218,
    ID_VEHICLE_SYNC = 219,
    ID_RCON_COMMAND = 220,
    ID_RCON_RESPONCE = 221,
    ID_WEAPONS_UPDATE = 222,
    ID_STATS_UPDATE = 223,
    ID_BULLET_SYNC = 224,
};
RPCs:
pawn Code:
/*
    Updated to 0.3z by P3ti
*/


#include "main.h"

int RPC_ServerJoin = 137;
int RPC_ServerQuit = 138;
int RPC_InitGame = 139;
int RPC_ClientJoin = 25;
int RPC_NPCJoin = 54;
int RPC_Death = 53;
int RPC_RequestClass = 128;
int RPC_RequestSpawn = 129;
int RPC_SetInteriorId = 118;
int RPC_Spawn = 52;
int RPC_Chat = 101;
int RPC_EnterVehicle = 26;
int RPC_ExitVehicle = 154;
int RPC_DamageVehicle = 106;
int RPC_MenuSelect = 132;
int RPC_MenuQuit = 140;
int RPC_ScmEvent = 96;
int RPC_AdminMapTeleport = 255;
int RPC_WorldPlayerAdd = 32;
int RPC_WorldPlayerDeath = 166;
int RPC_WorldPlayerRemove = 163;
int RPC_WorldVehicleAdd = 164;
int RPC_WorldVehicleRemove = 165;
int RPC_SetCheckpoint = 107;
int RPC_DisableCheckpoint = 37;
int RPC_SetRaceCheckpoint = 38;
int RPC_DisableRaceCheckpoint = 39;
int RPC_UpdateScoresPingsIPs = 155;
int RPC_SvrStats = 102;
int RPC_GameModeRestart = 40;
int RPC_ConnectionRejected = 130;
int RPC_ClientMessage = 93;
int RPC_WorldTime = 94;
int RPC_Pickup = 95;
int RPC_DestroyPickup = 63;
int RPC_DestroyWeaponPickup = 97;
int RPC_Weather = 152;
int RPC_SetTimeEx = 255;
int RPC_ToggleClock = 30;
int RPC_ServerCommand = 50;
int RPC_PickedUpPickup = 131;
int RPC_PickedUpWeapon = 255;
int RPC_VehicleDestroyed = 136;
int RPC_DialogResponse = 62;
int RPC_PlayAudioStream = 41;
int RPC_StopAudioStream = 42;
int RPC_ClickPlayer = 23;
int RPC_PlayerUpdate = 60;
int RPC_ClickTextDraw = 83;
int RPC_MapMarker = 119;
int RPC_PlayerGiveTakeDamage = 115; // bool Give/Take, playerid, amount, weaponid
int RPC_EnterEditObject = 27;
int RPC_EditObject = 117;

int RPC_ScrSetSpawnInfo = 68;
int RPC_ScrSetPlayerTeam = 69;
int RPC_ScrSetPlayerSkin = 153;
int RPC_ScrSetPlayerName = 11;
int RPC_ScrSetPlayerPos = 12;
int RPC_ScrSetPlayerPosFindZ = 13;
int RPC_ScrSetPlayerHealth = 14;
int RPC_ScrPutPlayerInVehicle = 70;
int RPC_ScrRemovePlayerFromVehicle = 71;
int RPC_ScrSetPlayerColor = 72;
int RPC_ScrDisplayGameText = 73;
int RPC_ScrSetInterior = 156;
int RPC_ScrSetCameraPos = 157;
int RPC_ScrSetCameraLookAt = 158;
int RPC_ScrSetVehiclePos = 159;
int RPC_ScrSetVehicleZAngle = 160;
int RPC_ScrVehicleParams = 161;
int RPC_ScrSetCameraBehindPlayer = 162;
int RPC_ScrTogglePlayerControllable = 15;
int RPC_ScrPlaySound = 16;
int RPC_ScrSetWorldBounds = 17;
int RPC_ScrHaveSomeMoney = 18;
int RPC_ScrSetPlayerFacingAngle = 19;
int RPC_ScrResetMoney = 20;
int RPC_ScrResetPlayerWeapons = 21;
int RPC_ScrGivePlayerWeapon = 22;
int RPC_ScrRespawnVehicle = 255;
int RPC_ScrLinkVehicle = 65;
int RPC_ScrSetPlayerArmour = 66;
int RPC_ScrDeathMessage = 55;
int RPC_ScrSetMapIcon = 56;
int RPC_ScrDisableMapIcon = 144;
int RPC_ScrSetWeaponAmmo = 145;
int RPC_ScrSetGravity = 146;
int RPC_ScrSetVehicleHealth = 147;
int RPC_ScrAttachTrailerToVehicle = 148;
int RPC_ScrDetachTrailerFromVehicle = 149;
int RPC_ScrCreateObject = 44;
int RPC_ScrSetObjectPos = 45;
int RPC_ScrSetObjectRotation = 46;
int RPC_ScrDestroyObject = 47;
int RPC_ScrCreateExplosion = 79;
int RPC_ScrShowNameTag = 80;
int RPC_ScrMoveObject = 99;
int RPC_ScrStopObject = 122;
int RPC_ScrNumberPlate = 123;
int RPC_ScrTogglePlayerSpectating = 124;
int RPC_ScrSetPlayerSpectating = 255;
int RPC_ScrPlayerSpectatePlayer = 126;
int RPC_ScrPlayerSpectateVehicle = 127;
int RPC_ScrRemoveComponent = 57;
int RPC_ScrForceSpawnSelection = 74;
int RPC_ScrAttachObjectToPlayer = 75;
int RPC_ScrInitMenu = 76;
int RPC_ScrShowMenu = 77;
int RPC_ScrHideMenu = 78;
int RPC_ScrSetPlayerWantedLevel = 133;
int RPC_ScrShowTextDraw = 134;
int RPC_ScrHideTextDraw = 135;
int RPC_ScrEditTextDraw = 105;
int RPC_ScrAddGangZone = 108;
int RPC_ScrRemoveGangZone = 120;
int RPC_ScrFlashGangZone = 121;
int RPC_ScrStopFlashGangZone = 85;
int RPC_ScrApplyAnimation = 86;
int RPC_ScrClearAnimations = 87;
int RPC_ScrSetSpecialAction = 88;
int RPC_ScrEnableStuntBonus = 104;
int RPC_ScrSetFightingStyle = 89;
int RPC_ScrSetPlayerVelocity = 90;
int RPC_ScrSetVehicleVelocity = 91;
int RPC_ScrToggleWidescreen = 255;
int RPC_ScrSetVehicleTireStatus = 255;
int RPC_ScrSetPlayerDrunkLevel = 35;
int RPC_ScrDialogBox = 61;
int RPC_ScrCreate3DTextLabel = 36;
Reply
#12

Quote:
Originally Posted by kurta999
View Post
Don't waste your time, this from raksamp:

Packet IDs:
pawn Code:
enum PacketEnumeration : unsigned char
{
    ID_PLAYER_SYNC = 212,
    ID_MARKERS_SYNC = 213,
    ID_UNOCCUPIED_SYNC = 214,
    ID_TRAILER_SYNC = 215,
    ID_PASSENGER_SYNC = 216,
    ID_SPECTATOR_SYNC = 217,
    ID_AIM_SYNC = 218,
    ID_VEHICLE_SYNC = 219,
    ID_RCON_COMMAND = 220,
    ID_RCON_RESPONCE = 221,
    ID_WEAPONS_UPDATE = 222,
    ID_STATS_UPDATE = 223,
    ID_BULLET_SYNC = 224,
};
RPCs:
pawn Code:
/*
    Updated to 0.3z by P3ti
*/


#include "main.h"

int RPC_ServerJoin = 137;
int RPC_ServerQuit = 138;
int RPC_InitGame = 139;
int RPC_ClientJoin = 25;
int RPC_NPCJoin = 54;
int RPC_Death = 53;
int RPC_RequestClass = 128;
int RPC_RequestSpawn = 129;
int RPC_SetInteriorId = 118;
int RPC_Spawn = 52;
int RPC_Chat = 101;
int RPC_EnterVehicle = 26;
int RPC_ExitVehicle = 154;
int RPC_DamageVehicle = 106;
int RPC_MenuSelect = 132;
int RPC_MenuQuit = 140;
int RPC_ScmEvent = 96;
int RPC_AdminMapTeleport = 255;
int RPC_WorldPlayerAdd = 32;
int RPC_WorldPlayerDeath = 166;
int RPC_WorldPlayerRemove = 163;
int RPC_WorldVehicleAdd = 164;
int RPC_WorldVehicleRemove = 165;
int RPC_SetCheckpoint = 107;
int RPC_DisableCheckpoint = 37;
int RPC_SetRaceCheckpoint = 38;
int RPC_DisableRaceCheckpoint = 39;
int RPC_UpdateScoresPingsIPs = 155;
int RPC_SvrStats = 102;
int RPC_GameModeRestart = 40;
int RPC_ConnectionRejected = 130;
int RPC_ClientMessage = 93;
int RPC_WorldTime = 94;
int RPC_Pickup = 95;
int RPC_DestroyPickup = 63;
int RPC_DestroyWeaponPickup = 97;
int RPC_Weather = 152;
int RPC_SetTimeEx = 255;
int RPC_ToggleClock = 30;
int RPC_ServerCommand = 50;
int RPC_PickedUpPickup = 131;
int RPC_PickedUpWeapon = 255;
int RPC_VehicleDestroyed = 136;
int RPC_DialogResponse = 62;
int RPC_PlayAudioStream = 41;
int RPC_StopAudioStream = 42;
int RPC_ClickPlayer = 23;
int RPC_PlayerUpdate = 60;
int RPC_ClickTextDraw = 83;
int RPC_MapMarker = 119;
int RPC_PlayerGiveTakeDamage = 115; // bool Give/Take, playerid, amount, weaponid
int RPC_EnterEditObject = 27;
int RPC_EditObject = 117;

int RPC_ScrSetSpawnInfo = 68;
int RPC_ScrSetPlayerTeam = 69;
int RPC_ScrSetPlayerSkin = 153;
int RPC_ScrSetPlayerName = 11;
int RPC_ScrSetPlayerPos = 12;
int RPC_ScrSetPlayerPosFindZ = 13;
int RPC_ScrSetPlayerHealth = 14;
int RPC_ScrPutPlayerInVehicle = 70;
int RPC_ScrRemovePlayerFromVehicle = 71;
int RPC_ScrSetPlayerColor = 72;
int RPC_ScrDisplayGameText = 73;
int RPC_ScrSetInterior = 156;
int RPC_ScrSetCameraPos = 157;
int RPC_ScrSetCameraLookAt = 158;
int RPC_ScrSetVehiclePos = 159;
int RPC_ScrSetVehicleZAngle = 160;
int RPC_ScrVehicleParams = 161;
int RPC_ScrSetCameraBehindPlayer = 162;
int RPC_ScrTogglePlayerControllable = 15;
int RPC_ScrPlaySound = 16;
int RPC_ScrSetWorldBounds = 17;
int RPC_ScrHaveSomeMoney = 18;
int RPC_ScrSetPlayerFacingAngle = 19;
int RPC_ScrResetMoney = 20;
int RPC_ScrResetPlayerWeapons = 21;
int RPC_ScrGivePlayerWeapon = 22;
int RPC_ScrRespawnVehicle = 255;
int RPC_ScrLinkVehicle = 65;
int RPC_ScrSetPlayerArmour = 66;
int RPC_ScrDeathMessage = 55;
int RPC_ScrSetMapIcon = 56;
int RPC_ScrDisableMapIcon = 144;
int RPC_ScrSetWeaponAmmo = 145;
int RPC_ScrSetGravity = 146;
int RPC_ScrSetVehicleHealth = 147;
int RPC_ScrAttachTrailerToVehicle = 148;
int RPC_ScrDetachTrailerFromVehicle = 149;
int RPC_ScrCreateObject = 44;
int RPC_ScrSetObjectPos = 45;
int RPC_ScrSetObjectRotation = 46;
int RPC_ScrDestroyObject = 47;
int RPC_ScrCreateExplosion = 79;
int RPC_ScrShowNameTag = 80;
int RPC_ScrMoveObject = 99;
int RPC_ScrStopObject = 122;
int RPC_ScrNumberPlate = 123;
int RPC_ScrTogglePlayerSpectating = 124;
int RPC_ScrSetPlayerSpectating = 255;
int RPC_ScrPlayerSpectatePlayer = 126;
int RPC_ScrPlayerSpectateVehicle = 127;
int RPC_ScrRemoveComponent = 57;
int RPC_ScrForceSpawnSelection = 74;
int RPC_ScrAttachObjectToPlayer = 75;
int RPC_ScrInitMenu = 76;
int RPC_ScrShowMenu = 77;
int RPC_ScrHideMenu = 78;
int RPC_ScrSetPlayerWantedLevel = 133;
int RPC_ScrShowTextDraw = 134;
int RPC_ScrHideTextDraw = 135;
int RPC_ScrEditTextDraw = 105;
int RPC_ScrAddGangZone = 108;
int RPC_ScrRemoveGangZone = 120;
int RPC_ScrFlashGangZone = 121;
int RPC_ScrStopFlashGangZone = 85;
int RPC_ScrApplyAnimation = 86;
int RPC_ScrClearAnimations = 87;
int RPC_ScrSetSpecialAction = 88;
int RPC_ScrEnableStuntBonus = 104;
int RPC_ScrSetFightingStyle = 89;
int RPC_ScrSetPlayerVelocity = 90;
int RPC_ScrSetVehicleVelocity = 91;
int RPC_ScrToggleWidescreen = 255;
int RPC_ScrSetVehicleTireStatus = 255;
int RPC_ScrSetPlayerDrunkLevel = 35;
int RPC_ScrDialogBox = 61;
int RPC_ScrCreate3DTextLabel = 36;
Thanks ^^
Reply
#13

Parameters you can find by reverse engineering samp-server or there are two other places that i won't mention here
Reply
#14

This looks like a great plugin, and I am really looking into it to replace the RNPC plugin! But, this would be even more great if it had a better documentation, I am not really clear of what we can achieve with this exactly, and a in-depth look on the functions would be awesome. This attracts a lot my attention and I am going to test it now to find out myself the limits of your work.

Nice job, you could do better in the documentation aspect though.
Reply
#15

Quote:
Originally Posted by Marricio
View Post
This looks like a great plugin, and I am really looking into it to replace the RNPC plugin! But, this would be even more great if it had a better documentation, I am not really clear of what we can achieve with this exactly, and a in-depth look on the functions would be awesome. This attracts a lot my attention and I am going to test it now to find out myself the limits of your work.

Nice job, you could do better in the documentation aspect though.
What? Are you sure that you know what you're talking about? lol

This plugin has nothing to do with NPC, its about RPC, Bitstreams etc, i think that the author should re-name the plugin to BitStream cause its the main purposal of it. Its not NPC's plugin, it just allow you to control a bit more of clients game.
Reply
#16

Quote:
Originally Posted by ipsLeon
View Post
What? Are you sure that you know what you're talking about? lol
Yes, I am very sure, and if you think what I'm talking about is incorrect then you're in complete freedom to correct me, but if not so, mind your own business.
Reply
#17

Quote:
Originally Posted by Marricio
View Post
Yes, I am very sure, and if you think what I'm talking about is incorrect then you're in complete freedom to correct me, but if not so, mind your own business.
See my edited msg above, i explained there.
Reply
#18

Just be careful that that plugin does not create opportunities to fake player counts ... you know what happens to these plugins if you ever heard of "CNPC".

But I like the idea
Reply
#19

Quote:
Originally Posted by ipsLeon
View Post
What? Are you sure that you know what you're talking about? lol

This plugin has nothing to do with NPC, its about RPC, Bitstreams etc, i think that the author should re-name the plugin to BitStream cause its the main purposal of it. Its not NPC's plugin, it just allow you to control a bit more of clients game.
Even if it's not a NPC plugin, I believe the functions can allow me to make a simple NPC script (even if it's a client-side behaviour, I can try working it out) since I only need them to stand and do nothing. I'm still trying to understand the plugin concept, if I got it wrong, tell me now. So far I am getting what I expected and what I need modifying the RPG.inc code, I want to play around with this though.


Tell me, am I getting the incorrect idea of this plugin?

EDIT:



This is what I meant.
Reply
#20

This plugin provides low level access to network functions and it could be used for many things, custom object streamer, custom vehicle streamer, custom NPC streamer, and so on.. So both of you are right. I will add more detailed documentation and correct parameters for most of RPC and packets (some of them can be found on the internet as kurta999 said and showed) if I'm gonna be sure that this thread stays and plugin will be approved. Offical name of this plugin is RAK and originates from RakNet - network engine used in samp.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)