FireBullet

From NPC for VCMP 0.4 Servers
Revision as of 04:28, 8 October 2024 by Habi (talk | contribs) (Created page with "<poem style="border: 2px solid #d6d2c5; background-color: #f9f4e6; padding: 1em;"> This function was added in v1.8 beta 4 and will not work in previous versions. </poem> {{Welcome| desc=This will send a bullet-fired packet to server.| params=<syntaxhighlight lang="lua">( weaponid, posx, posy, posz)</syntaxhighlight> <poem>::weaponid: The ID of the weapon whose bullet is fired ::posx : The x co-ordinate of bullet-origin position ::posy : The y co-ordinate of bullet-origin...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function was added in v1.8 beta 4 and will not work in previous versions.


Description:
This will send a bullet-fired packet to server.


Parameters:

( weaponid, posx, posy, posz)

weaponid: The ID of the weapon whose bullet is fired
posx : The x co-ordinate of bullet-origin position
posy : The y co-ordinate of bullet-origin position
posz : The z co-ordinate of bullet-origin position
The posx, posy are approximately same as that of npc's position. However posz when given must be slightly greater (+0.5) than npc's z-coordinate.


Return Values:
This function does not return any specific values.


Example

FireBullet(26, GetMyPos().x, GetMyPos().y, GetMyPos().z+0.5 );