User Tools

Site Tools


reference:server_commands:weapon_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
reference:server_commands:weapon_commands [2015/02/25 17:08] – created mitreference:server_commands:weapon_commands [2025/05/28 16:35] (current) – external edit 127.0.0.1
Line 4: Line 4:
  
 ==== *weaponfire ==== ==== *weaponfire ====
-^ Format | *weaponfire [weapon_num],[from_playerid],[world_X],[world_Y],[world_z],[target_x],[target_y],[target_z],[param] |+^ Format | *weaponfire [weapon_num],[from_playerid],[world_X],[world_Y],[world_z],[dir_x],[dir_y],[dir_z],[param] |
 ^ Description | Adds a weapon to the world | ^ Description | Adds a weapon to the world |
- +//Example//: <note> 
-Example *attach Bob |+<code>Event( "Custom", "DemoWeapon"
 +
 +    $angle = 0 
 +    while ( $angle < 360 ) 
 +    { 
 +        $angleX = sysSin( $angle, 100 ) 
 +        $angleY = sysCos( $angle, 100 ) 
 +        $posX = $gPlayerWorldX + $angleX 
 +        $posY = $gPlayerWorldY + $angleX 
 +        $posZ = $gPlayerWorldZ + 300 
 +        *weaponfire 1,$gPlayerID,$posX,$posY,$posZ,$angleX,$angleY,0,
 +        $angle += 36         
 +    } 
 +
 +</code> 
 +</note>
  
 ==== *weaponfirespread ==== ==== *weaponfirespread ====
 ^ Format | *weaponfirespread [spread_type],[spread_range],[num_weaps],[weapon_num],[from_player],[world_X],[world_Y],[world_z],[vel_x],[vel_y],[vel_z],[param] | ^ Format | *weaponfirespread [spread_type],[spread_range],[num_weaps],[weapon_num],[from_player],[world_X],[world_Y],[world_z],[vel_x],[vel_y],[vel_z],[param] |
 ^ Description | Adds a batch of weapons to the world | ^ Description | Adds a batch of weapons to the world |
 +//Example//: <note>
 +<code>
 +Event( "Custom", "Testweap" )
 +{
 +    $posX = $gPlayerWorldX
 +    $posY = $gPlayerWorldY
 +    $posZ = $gPlayerWorldZ + 2000
  
-^ Example | *attach Bob | +    *weaponfirespread 0,2000,100,3,$gPlayerID,$posX,$posY,$posZ,0,0,0,0 
 +
 +</code> 
 +</note>
  
 <note tip>If you're using the old-school method of modifying your server's Data\Weapons.txt to set up weapons, dont forget to use ''*refreshweap'' to reload the file</note> <note tip>If you're using the old-school method of modifying your server's Data\Weapons.txt to set up weapons, dont forget to use ''*refreshweap'' to reload the file</note>
reference/server_commands/weapon_commands.1424884101.txt.gz · Last modified: (external edit)