SendOnFootSyncDataEx: Difference between revisions
No edit summary |
No edit summary |
||
Line 18: | Line 18: | ||
::isReloading: true, if the player has stopped shooting and is reloading his weapon. false, otherwise. The keys while reloading when 'Bitwise AND' with 512 must be zero while reloading. If the keys given are otherwise, the corresponding bit will be set off to match this requirement. | ::isReloading: true, if the player has stopped shooting and is reloading his weapon. false, otherwise. The keys while reloading when 'Bitwise AND' with 512 must be zero while reloading. If the keys given are otherwise, the corresponding bit will be set off to match this requirement. | ||
</poem>| | </poem>| | ||
relfuncs=*[[SendOnFootSyncData]]| | relfuncs=*[[SendOnFootSyncData]]| | ||
}} | }} |
Latest revision as of 19:43, 9 January 2023
This function has been added in v1.6.
Description:
This will send a on foot sync packet to server which is filled by the following parameters.
Parameters:
( [integer] keys, [Vector]pos, [float]angle, [integer]health, [integer]armour, [integer]weapon, [integer]ammo, [Vector]speed, [Vector]aimpos, [Vector]aimdir, [bool]isCrouching, [bool]isReloading ) )
keys : The npc's Game Keys to hold.
pos : The npc's position.
angle : The npc's facing angle in radians.(-PI to PI ).
health : Health of the npc.
armour : Armour of the npc.
weapon : Weapon of the npc.
ammo : The amount of ammo the npc has for weapon.
speed : The npc's speed (supposed to be same as player.Speed on serverside )
aimpos : The aim position of NPC ( can be determined using server using player.AimPos or can be calculated artificially).
aimdir : The aim direction of NPC (value given by player.Aimdir on serverside )
isCrouching : Whether the player is crouching. ( need not set to true even if aiming using weapons like ruger or sniper rifles. The logic is whether player has previously send 'Crouch Key'.)
isReloading: true, if the player has stopped shooting and is reloading his weapon. false, otherwise. The keys while reloading when 'Bitwise AND' with 512 must be zero while reloading. If the keys given are otherwise, the corresponding bit will be set off to match this requirement.
Return Values:
This function does not return any specific values.
Related Functions
The following functions may be helpful as they relate to this function in one way or another.