how to make players get out of FPV?

Started by ℛḝξ☂, Dec 05, 2015, 12:34 PM

Previous topic - Next topic

ℛḝξ☂


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
I may be a slow walker but I am always walking.

ℛḝξ☂

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
I may be a slow walker but I am always walking.

Xmair

function onPlayerActionChange(p, oldAction, newAction)
{
    if (newAction == 12 && (player.Weapon == 26 || player.Weapon == 27 || player.Weapon == 32))
 {
        p.SetWeapon(0,0)
    }
}

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

ℛḝξ☂

#3
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.
I may be a slow walker but I am always walking.