Author Topic: Selective fire  (Read 1057 times)

Im trying to make a selective fire weapon and im having problems with it. Im basicly trying to make a code that switches the Shape base image data so it fires diffrently with diffrent slash commands
Code: [Select]
function servercmdSingleMode(%client)
{

%datablock = weapon;

{

 messageclient(%client,'',"\c1weapon now in Single Fire mode.");
}
function servercmdthreeMode(%client)
{

%datablock = weaponb;

{
{

 messageclient(%client,'',"\c1weapon now in Three Shot Fire mode.");
}
function servercmdautoMode(%client)
{


%datablock = weaponc;

{

 messageclient(%client,'',"\c1weapon now in Automatic Fire mode.");
}
That is all I got to work with. I dont know if its correct. I tried coding it but I phail at coding. Im only a modler and mapper.
Txs in advance
« Last Edit: November 24, 2007, 01:03:51 AM by Peaceful War »

So much wrong with it.
Sorry to break my leaving vowel, but this was needed.
Code: [Select]
function servercmdSingleMode(%client)
{
%WEAPONSNAME.datablock = weapon;
messageclient(%client,'',"\c1weapon now in Single Fire mode.");
}

function servercmdthreeMode(%client)
{
%WEAPONSNAME.datablock = weaponb;
messageclient(%client,'',"\c1weapon now in Three Shot Fire mode.");
}

function servercmdautoMode(%client)
{
%WEAPONSNAME.datablock = weaponc;
messageclient(%client,'',"\c1weapon now in Automatic Fire mode.");
}
That might help.

You can't change something's datablock on the go, you could change the weaponimage it mounts but when you use the item. (GunItem.image = RocketLauncherImage;)

That would mean the item has to be unused and used again (Q Q) for it to work and it would change the item for everyone in the server!

I suggest looking at Dual Guns or the Flak Cannon for two different examples of multiple fire modes.