From Soldat Community Wiki
Jump to: navigation, search
function CreateBullet(X, Y, VelX, VelY, HitM: single; sStyle, Owner: byte): integer;

Parameter Info:
 X (Single): X coordinate for the bullet to appear
 Y (Single): Y coordinate for the bullet to appear
 VelX (Single): X Velocity for the bullet to travel.
 VelY (Single): Y Velocity for the bullet to travel.
 HitM (Single): Hit Multiplier (Usually 100 works good)
 sStype (Byte): Bullet style. See this page for bullet types.
 Owner (Byte): Player who will be given credit for any kills by the bullets.

 This function will create a projectile that will be visible to all players.
 NOTE: Certain exploding bullet types have been disabled due to it causing weapon mod problems.
sType list (from weapons.ini)
 1        plain bullet
 2        frag grenade
 3        shotgun pellets
 4        m79 grenade
 5        flame
 6        punch
 7        arrow
 8        flame arrow
 9        cluster nade
 10       cluster shrapnel
 11       knife/chainsaw
 12       LAW missile
 13       knife
 14       M2 bullet
 (as of soldatserver 2.6.3 bullet types 8,9 and 12 do not work properly, also plain bullets spawn only 
 if the owner has a plain bullet weapon)


   CreateBullet(GetPlayerStat(1,'x'), GetPlayerStat(1,'y') - 500, 0, 0,100, 2, 1);
   // Will spawn a grenade above Player ID 1 with 0 Velocity, so it falls straight on top of them.

External Links