Hi there, try this for bullets:
This may not be a perfect method, but it works for me.
current_ammo = 100
maximum_ammo = 100
minimum_ammo = 0
current_bullet = 99
speed = 1.2
Rem Create the objects for the Bullets
FOR X = 100 TO 199
LOAD OBJECT "models\bullet.x",X
SCALE OBJECT X,250,250,400
GHOST OBJECT ON X
NEXT X
Rem We will now hide the bullet objects until we will need them
FOR X = 100 TO 199
HIDE OBJECT X
NEXT X
Rem We now set the object collision for the object bullet.x
FOR X = 100 TO 199
AUTOMATIC OBJECT COLLISION X,0.1,0
NEXT X
rem Main Game loop
DO
Rem We will now set the object collision for the bullets
Rem We will set the collision index for all the bullets as
Rem 2 and upwards because the value 1 is used for the player
FOR X = 100 TO 199
SET BSP OBJECT COLLISION 2,X,0.1,0
NEXT X
Rem Controls the firing of the gun(s)
Rem Check for mouseclick, so to fire current selected weapon
IF MOUSECLICK() = 1 AND current_ammo > 0
Rem Decrease the current ammo by one as each bullet has been fired
current_ammo = current_ammo - 1
current_bullet = current_bullet + 1
Rem Play the gun sound when the weapon has been fired
PLAY SOUND GunSnd
Rem Show the first bullet
SHOW OBJECT current_bullet
Rem We now set where the bullet will be fired from
POSITION OBJECT current_bullet,CAMERA POSITION X(0),CAMERA POSITION Y(0),CAMERA POSITION Z(0)
ROTATE OBJECT current_bullet,CAMERA ANGLE X(0),CAMERA ANGLE Y(0),0
Rem We now move the current bullet in a forward direction
Rem relative to the player's direction
MOVE OBJECT current_bullet,speed
Rem If the mouseclick is not equal to button 1 then do the following
ELSE
Rem We continue to move the last bullet until it's life = 0
SELECT current_bullet
CASE 99
flag = 0
ENDCASE
CASE 100 : MOVE OBJECT 100,6 : ENDCASE
CASE 101 : MOVE OBJECT current_bullet,speed
ENDCASE
CASE DEFAULT : MOVE OBJECT current_bullet - 1,speed : ENDCASE
ENDSELECT
ENDIF
Rem We now move the object of any bullet so to make sure it
Rem doesn't appear on the screen
FOR X = 100 TO 199
IF OBJECT VISIBLE(X) = 1
MOVE OBJECT X,speed
ELSE
HIDE OBJECT X
ENDIF
NEXT X
Rem This should increase system performance as it shouldn't
Rem display an object if it is not visible by the player's camera
FOR X = 100 TO 199
IF OBJECT IN SCREEN(X) = 1
SHOW OBJECT X
ELSE
HIDE OBJECT X
ENDIF
NEXT X
Rem We now check if the current bullet exists and then move it
IF OBJECT EXIST(current_bullet)
MOVE OBJECT current_bullet,speed
ENDIF
Rem We now handle the bullet collision with the world and other stuff
IF BSP COLLISION HIT(2)
HIDE OBJECT current_bullet
PLAY SOUND ImpactSnd
ENDIF
Rem This is to make sure that the current bullets are not
Rem displayed on the screen
IF current_ammo = 0
FOR X = 100 TO 199
HIDE OBJECT X
NEXT X
ENDIF
I hope this helps ya.