Weaponcommand
Posted: Mon Aug 25, 2008 3:31 pm
Hi everyone. I seem to have trouble making the weaponcommand to work.
I don't want to edit tiks, but there's a way to change somethings through script (ie with weaponcommand)
Like these (I have found in search)
Actually I'd like to use all of these commands and make them work but for now I want to take all weapons from all players after X number of seconds. And give them a pistol with no ammo to bash.
NOTE: I haven't included my time code and the TAKE and GIVE commands don't work either.
Here's my code:
I don't want to edit tiks, but there's a way to change somethings through script (ie with weaponcommand)
Like these (I have found in search)
Code: Select all
// these 2 lines give him unlimited ammo - you can remove them if you want
weaponcommand dual dmammorequired 0
weaponcommand dual usenoammo 1
// fire rate - can be removed
weaponcommand dual dmfiredelay 1
// here, change this value:
weaponcommand dual dmmovementspeed 1.0
// this makes it so that you can't drop the weapon - we don't want the other team to lay their hands on this! ;)
weaponcommand dual notdroppable
// bullet damage and accuracy - can be removed
weaponcommand dual dmbulletdamage 60
weaponcommand dual dmbulletspread 25 25 150 150NOTE: I haven't included my time code and the TAKE and GIVE commands don't work either.
Here's my code:
Code: Select all
for (local.I=1;local.I <= $player.size;local.I++)
{
if ($player[local.I].dmteam=="spectator")
{
end
}
if ($player[local.I].dmteam=="allies")
{
$player[local.I] takeall
waitframe
$player[local.I] item weapons/colt45.tik
//$player[local.I] take ammo 999
$player[local.I] weaponcommand dual startammo 0
$player[local.I] useweaponclass pistol
}
end