Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: Banaqs on Dec 14, 2014, 11:05 PM

Title: How to block heli cannon?
Post by: Banaqs on Dec 14, 2014, 11:05 PM
How to block heli cannon wep?
Title: Re: How to block heli cannon?
Post by: wacek on Dec 15, 2014, 10:05 AM
I`m join in question. How block heli cannon and rockets in Hunter?
Title: Re: How to block heli cannon?
Post by: . on Dec 15, 2014, 02:52 PM
function onPlayerWeaponChange(i_player, previous, current)
{
if (current == WEP_HELICANNON)
{
i_player.SetWeapon(previous, i_player.Ammo);
}
}
Title: Re: How to block heli cannon?
Post by: wacek on Dec 16, 2014, 09:52 PM
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.
Title: Re: How to block heli cannon?
Post by: . on Dec 16, 2014, 10:45 PM
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.
Title: Re: How to block heli cannon?
Post by: wacek on Dec 19, 2014, 10:36 AM
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?