- 8,868
- 11,572
С помощью данного скрипта вы сможете отправлять/эмулировать получение RPC
Активация: /rpc
для "преобразования" https://github.com/Brunoo16/samp-packet-list/wiki/RPC-List в массив я юзал это:
Lua:
local t = {
'ShowActor - ID: 171\nParameters: UINT16 wActorID, UINT32 SkinID, float X, float Y, float Z, float Angle, float Health, bool Invulnerable',
'HideActor - ID: 172\nParameters: UINT16 wActorID',
'ApplyActorAnimation - ID: 173\nParameters: UINT16 wActorID, UINT8 AnimLibLength, char AnimLib[], UINT8 AnimNameLength, char AnimName[], float fDelta, bool loop, bool lockx, bool locky, bool freeze, UINT32 time',
'ClearActorAnimation - ID: 174\nParameters: UINT16 wActorID',
'SetActorFacingAngle - ID: 175\nParameters: UINT16 wActorID, float angle',
'SetActorPos - ID: 176\nParameters: UINT16 wActorID, float x, float y, float z',
'SetActorHealth - ID: 178\nParameters: UINT16 wActorID, float health',
'SetPlayerAttachedObject - ID: 113\nParameters: UINT16 playerid, UINT32 Index, bool create, UINT32 Model, UINT32 bone, float fOffsetX, float fOffsetY, float fOffsetZ, float fRotX, float fRotY, float fRotZ, float fScaleX, float fScaleY, float fScaleZ, INT32 materialcolor1, INT32 materialcolor2',
'ChatBubble - ID: 59\nParameters: UINT16 playerid, UINT32 color, float drawDistance, UINT32 expiretime, UINT8 textLength, char text[]',
'DisableCheckpoint - ID: 37\nParameters: no no',
'SetRaceCheckpoint - ID: 38\nParameters: UINT8 type, float X, float Y, float Z, float nextposX, float nextposY, float nextposZ, float radius',
'DisableRaceCheckpoint - ID: 39\nParameters: no no',
'SetCheckpoint - ID: 107\nParameters: float x, float y, float z, float radius',
'ShowDialog - ID: 61\nParameters: UINT16 wDialogID, UINT8 bDialogStyle, UINT8 bTitleLength, char[] szTitle, UINT8 bButton1Len, char[] szButton1, UINT8 bButton2Len, char[] szButton2, CSTRING szInfo',
'AddGangZone - ID: 108\nParameters: UINT16 wGangZoneID, float min_x, float min_y, float max_x, float max_y, UINT32 color',
'GangZoneDestroy - ID: 120\nParameters: UINT16 wGangZoneID',
'GangZoneFlash - ID: 121\nParameters: UINT16 wGangZoneID, UINT32 color',
'GangZoneStopFlash - ID: 85\nParameters: UINT16 wGangZoneID',
'ShowGameText - ID: 73\nParameters: UINT32 dStyle, UINT32 dTime, UINT32 dMessageLength, char Message[]',
'SetPlayerMapIcon - ID: 56\nParameters: UINT8 bIconID, float posX, float posY, float posZ, UINT8 type, UINT32 color, UINT8 style',
'RemovePlayerMapIcon - ID: 144\nParameters: UINT8 bIconID',
'PlayerEnterVehicle - ID: 26\nParameters: UINT16 wPlayerID, UINT16 wVehicleID, UINT8 bIsPassenger',
'PlayerExitVehicle - ID: 154\nParameters: UINT16 wPlayerID, UINT16 wVehicleID',
'RemoveVehicleComponent - ID: 57\nParameters: UINT16 wVehicleID, UINT16 wComponentID',
'LinkVehicleToInterior - ID: 65\nParameters: UINT16 wVehicleID, UINT8 bInteriorID',
'PutPlayerInVehicle - ID: 70\nParameters: UINT16 wVehicleID, UINT8 bSeatID',
'RemovePlayerFromVehicle - ID: 71\nParameters: no no',
'UpdateVehicleDamageStatus - ID: 106\nParameters: UINT16 wVehicleID, UINT32 panels, UINT32 doors, UINT8 lights, UINT8 tires',
'SetVehicleNumberPlate - ID: 123\nParameters: UINT16 wVehicleID, UINT8 PlateLength, char[] PlateText',
'SetVehicleHealth - ID: 147\nParameters: UINT16 wVehicleID, float Health',
'SetVehiclePos - ID: 159\nParameters: UINT16 wVehicleID, float x, float y, float z',
'SetVehicleZAngle - ID: 160\nParameters: UINT16 wVehicleID, float Angle',
'SetVehicleParams - ID: 161\nParameters: UINT16 wVehicleID, UINT8 bObjective, UINT8 bDoorsLocked',
'WorldVehicleAdd - ID: 164\nParameters: INT16 wVehicleID, INT32 ModelID, float X, float Y, float Z, float Angle, INT8 InteriorColor1, INT8 InteriorColor2, float Health, INT8 interior, INT32 DoorDamageStatus, INT32 PanelDamageStatus, INT8 LightDamageStatus, INT8 tireDamageStatus, INT8 addsiren, INT8 modslot0, INT8 modslot1, INT8 modslot2, INT8 modslot3, INT8 modslot4, INT8 modslot5, INT8 modslot6, INT8 modslot7, INT8 modslot8, INT8 modslot9, INT8 modslot10, INT8 modslot11, INT8 modslot12, INT8 modslot13, INT8 PaintJob, INT32 BodyColor1, INT32 BodyColor2',
'WorldVehicleRemove - ID: 165\nParameters: UINT16 wVehicleID',
'Update3DTextLabel - ID: 58\nParameters: UINT16 wLabelID',
'SetWorldTime - ID: 94\nParameters: UINT8 bHour',
'SetTargeting - ID: 170\nParameters: bool bEnabled',
'ShowTextDraw - ID: 134\nParameters: UINT16 wTextDrawID, UINT8 Flags, float fLetterWidth, float fLetterHeight, UINT32 dwLetterColor, float fLineWidth, float fLineHeight, UINT32 dwBoxColor, UINT8 Shadow, UINT8 Outline, UINT32 dwBackgroundColor, UINT8 Style, UINT8 Selectable, float fX, float fY, UINT16 wModelID, float fRotX, float fRotY, float fRotZ, float fZoom, UINT16 wColor1, UINT16 wColor2, UINT16 szTextLen, char[] szText',
'SelectTextDraw - ID: 83\nParameters: UINT32 color, UINT8 enable',
'TextDrawSetString - ID: 105\nParameters: UINT16 wTextDrawID, UINT16 TextLength, char[] Text',
'EnableStuntBonus - ID: 104\nParameters: UINT8 enable',
'SpectatePlayer - ID: 126\nParameters: UINT16 wPlayerID, UINT8 bSpecCamType',
'SpectateVehicle - ID: 127\nParameters: UINT16 wVehicleID, UINT8 bSpecCamType',
'SetSpawnInfo - ID: 68\nParameters: UINT8 byteTeam, INT32 iSkin, UINT8 unk, float X, float Y, float Z, FLOAT fRotation, INT32 iSpawnWeapons1, INT32 iSpawnWeapons2, INT32 iSpawnWeapons3, INT32 iSpawnWeaponsAmmo1, INT32 iSpawnWeaponsAmmo2, INT32 iSpawnWeaponsAmmo3',
'RequestClass - ID: 128\nParameters: UINT8 bRequestOutcome, UINT8 byteTeam, INT32 iSkin, UINT8 unk, float X, float Y, float Z, FLOAT fRotation, INT32 iSpawnWeapons1, INT32 iSpawnWeapons2, INT32 iSpawnWeapons3, INT32 iSpawnWeaponsAmmo1, INT32 iSpawnWeaponsAmmo2, INT32 iSpawnWeaponsAmmo3',
'SetPlayerFacingAngle - ID: 19\nParameters: float angle',
'ServerJoin - ID: 137\nParameters: UINT16 wPlayerID, INT32 unknown, UINT8 isNPC, UINT8 PlayerNameLength, char[] PlayerName',
'ServerQuit - ID: 138\nParameters: UINT16 wPlayerID, UINT8 reason',
'UpdateScoresAndPings - ID: 155\nParameters: UINT16 wPlayerID, INT32 score, UINT32 ping',
'ApplyPlayerAnimation - ID: 86\nParameters: UINT16 wPlayerID, UINT8 AnimLibLength, char AnimLib[], UINT8 AnimNameLength, char AnimName[], float fDelta, bool loop, bool lockx, bool locky, bool freeze, UINT32 dTime',
'ClearPlayerAnimation - ID: 87\nParameters: UINT16 wPlayerID',
'DeathBroadcast - ID: 166\nParameters: UINT16 wPlayerID',
'SetPlayerName - ID: 11\nParameters: UINT16 wPlayerID, UINT8 NameLength, char[] Name, UINT8 unknown',
'SetPlayerPos - ID: 12\nParameters: float x, float y, float z',
'SetPlayerPosFindZ - ID: 13\nParameters: float x, float y, float z',
'SetPlayerSkillLevel - ID: 34\nParameters: UINT16 wPlayerID, UINT32 dSkillID, UINT16 wLevel',
'SetPlayerSkin - ID: 153\nParameters: UINT32 wPlayerID, UINT32 dSkinID',
'SetPlayerTime - ID: 29\nParameters: UINT8 bHour, UINT8 bSecond',
'SetPlayerSpecialAction - ID: 88\nParameters: UINT8 bActionID',
'SetPlayerWeather - ID: 152\nParameters: UINT8 bWeatherID',
'SetWorldBounds - ID: 17\nParameters: float max_x, float min_x, float max_y, float min_y',
'SetPlayerVelocity - ID: 90\nParameters: float x, float y, float z',
'TogglePlayerControllable - ID: 15\nParameters: UINT8 moveable',
'TogglePlayerSpectating - ID: 124\nParameters: UINT32 spectating',
'ToggleClock - ID: 30\nParameters: UINT8 toggle',
'SetPlayerTeam - ID: 69\nParameters: UINT16 wPlayerID, UINT8 bTeamID',
'PlayerPlaySound - ID: 16\nParameters: UINT32 soundid, float x, float y, float z',
'GivePlayerMoney - ID: 18\nParameters: UINT32 dMoney',
'ResetPlayerMoney - ID: 20\nParameters: no no',
'ResetPlayerWeapons - ID: 21\nParameters: no no',
'GivePlayerWeapon - ID: 22\nParameters: UINT32 dWeaponID, UINT32 dBullets',
'PlayAudioStream - ID: 41\nParameters: UINT8 UrlLength, char[] Url, float x, float y, float z, float radius, UINT8 UsePos',
'StopAudioStream - ID: 42\nParameters: no no',
'RemoveBuilding - ID: 43\nParameters: UINT32 dObjectModel, float x, float y, float z, float radius',
'SetPlayerHealth - ID: 14\nParameters: float health',
'SetPlayerArmour - ID: 66\nParameters: float armour',
'SetPlayerAmmo - ID: 145\nParameters: UINT8 bWeaponID, UINT16 wAmmo',
'SetPlayerCameraBehindPlayer - ID: 162\nParameters: no no',
'SetArmedWeapon - ID: 67\nParameters: UINT32 dWeaponID',
'WorldPlayerAdd - ID: 32\nParameters: UINT16 wPlayerID, uint8 team, UINT32 dSkinId, float PosX, float PosY, float PosZ, float facing_angle, UINT32 player_color, uint8 fighting_style',
'WorldPlayerRemove - ID: 163\nParameters: UINT16 wPlayerID',
'CreateExplosion - ID: 79\nParameters: float X, float Y, float Z, UINT16 wType, float radius',
'SendDeathMessage - ID: 55\nParameters: UINT16 wKillerID, UINT16 wPlayerID, UINT8 reason',
'SendClientMessage - ID: 93\nParameters: UINT32 dColor, UINT32 dMessageLength, char[] Message',
'SetPlayerDrunkLevel - ID: 35\nParameters: UINT32 dDrunkLevel',
'SetPlayerFightingStyle - ID: 89\nParameters: UINT16 wPlayerID, UINT8 fightstyle',
'SetPlayerInterior - ID: 156\nParameters: UINT8 bInteriorID',
'SetPlayerColor - ID: 72\nParameters: UINT16 wPlayerID, UINT32 dColor',
'ForceClassSelection - ID: 74\nParameters: no no',
'ToggleWidescreen - ID: 111\nParameters: bool enable',
'SetPlayerWantedLevel - ID: 133\nParameters: UINT8 bWantedLevel',
'SetPlayerCameraPos - ID: 157\nParameters: float lookposX, float lookposY, float lookposZ',
'SetPlayerCameraLookAt - ID: 158\nParameters: float lookposX, float lookposY, float lookposZ, UINT8 cutType',
}
function mysplit (inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={}
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
table.insert(t, str)
end
return t
end
for i = 1, #t do
local name, id, params = t[i]:match('(.+) - ID: (.+)\nParameters: (.+)')
if params ~= 'no no' then
pmT = mysplit(params, ',')
pResult = ''
for i = 1, #pmT do
local type, pName = pmT[i]:match('(.+) (.+)')
pResult = pResult .. "{'"..pName.."', '"..type:gsub(' ', '').."'}, "
--print(pmT[i])
end
else
pResult = pResult .. "{}, "
end
print('{'..id..', '..pResult..'},')
end
Вложения
Последнее редактирование: