Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: ℛḝξ☂ on Dec 05, 2015, 12:34 PM

Title: how to make players get out of FPV?
Post by: ℛḝξ☂ on Dec 05, 2015, 12:34 PM

Quote//Quote from stormeus, to block FPV in scripts.:
function onPlayerActionChange(player, oldAction, newAction)
{
    if (newAction == 12 && (player.Weapon == 26 || player.Weapon == 27 || player.Weapon == 32))
   {
        //do sth here.
    }
}

I Mean what sth I need to do? please help :C
Title: Re: how to make players get out of FPV?
Post by: ℛḝξ☂ on Dec 05, 2015, 12:35 PM
Just now I found a way

function onPlayerActionChange(p, oldAction, newAction)
{
    if (newAction == 12 && (player.Weapon == 26 || player.Weapon == 27 || player.Weapon == 32))
{
        p.IsFrozen = true; p.IsFrozen = false;
    }
}

Any other better solution ? :P
Title: Re: how to make players get out of FPV?
Post by: Xmair on Dec 05, 2015, 12:48 PM
function onPlayerActionChange(p, oldAction, newAction)
{
    if (newAction == 12 && (player.Weapon == 26 || player.Weapon == 27 || player.Weapon == 32))
 {
        p.SetWeapon(0,0)
    }
}
Title: Re: how to make players get out of FPV?
Post by: ℛḝξ☂ on Dec 05, 2015, 12:52 PM
Quote from: Xmair on Dec 05, 2015, 12:48 PMfunction onPlayerActionChange(p, oldAction, newAction)
{
    if (newAction == 12 && (player.Weapon == 26 || player.Weapon == 27 || player.Weapon == 32))
 {
        p.SetWeapon(0,0)
    }
}

It is actually useful, but I just don't want to disarm players in fpv.

edit: ah thanks, I forgot it won't disarm :d

problem solved.