How to block heli cannon?

Started by Banaqs, Dec 14, 2014, 11:05 PM

Previous topic - Next topic

Banaqs

How to block heli cannon wep?

wacek

I`m join in question. How block heli cannon and rockets in Hunter?

.

function onPlayerWeaponChange(i_player, previous, current)
{
if (current == WEP_HELICANNON)
{
i_player.SetWeapon(previous, i_player.Ammo);
}
}
.

wacek

Quote from: S.L.C on Dec 15, 2014, 02:52 PMfunction onPlayerWeaponChange(i_player, previous, current)
{
if (current == WEP_HELICANNON)
{
i_player.SetWeapon(previous, i_player.Ammo);
}
}

Still not works.

.

Quote from: wacek on Dec 16, 2014, 09:52 PMStill not works.

I'm curious if you've done any debugging on that code your self to see if it's actually getting called and what values are getting passed actually. Just to get an idea of what's going on in your server. Do you expect everything to come ready on a silver plate? Sometimes you have to get your hands dirty a little in order to get some results. No wonder you people suck at creating a decent game-mode to play. You can't write 2 lines of code before asking someone else for the rest.
.

wacek

#5
function onPlayerWeaponChange(i_player, previous, current)
{
if (current == WEP_HELICANNON)
{
i_player.SetWeapon(previous, i_player.Ammo);
}
}

and

function onPlayerWeaponChange(i_player, previous, current)
{
local WEP_HELICANNON = 35;
if (current == WEP_HELICANNON)
{
i_player.SetWeapon(previous, i_player.Ammo);
}

QuoteI'm curious if you've done any debugging on that code your self to see if it's actually getting called and what values are getting passed actually. Just to get an idea of what's going on in your server. Do you expect everything to come ready on a silver plate? Sometimes you have to get your hands dirty a little in order to get some results. No wonder you people suck at creating a decent game-mode to play. You can't write 2 lines of code before asking someone else for the rest.

If someone know, that really working for ID 35 for vehicle, because I trying and it not work.

I using latest update server engine and squirrel modules, so ask. Function Weapon synch. not working in 0.4?