Simple First Person aim disable for m4, ruger

Started by Kewun, Aug 16, 2016, 08:15 AM

Previous topic - Next topic

Kewun

function onPlayerActionChange( player, oldAction, newAction )
{
    if ( newAction == 12 ) // it will check if the player goes in new action.
    {
    if ( player.Weapon == 27 || player.Weapon == 26)
    {
    player.Skin = player.Skin;
    }
    }
}

Code tested and working.



KAKAN

instead of using player.Skin, simply use return 0 to provoke the action :p
:edit: Here's a minified form of your code:-
function onPlayerActionChange( player, oldAction, newAction )
{
    if ( newAction == 12 && ( player.Weapon == 27 || player.Weapon == 26 ) ) return 0;
    return 1;
}
Untested, but it should work.
oh no

Kewun


Kewun

nah, u can still aim first person mode with code

function onPlayerActionChange( player, oldAction, newAction )
{
    if ( newAction == 12 && ( player.Weapon == 27 || player.Weapon == 26 ) ) return 0;
    return 1;
}

vito


Beary

Maybe you can try this.
function onPlayerWeaponChange( player, oldwep, newwep )
{
if ( newwep == 26 || newwep == 27 ) player.CanAttack = false;
else player.CanAttack = true;
}

Kewun

nah, this sucks, you cant even shoot with m4 or ruger. Better

function onPlayerActionChange( player, oldAction, newAction )
{
    if ( newAction == 12 ) // it will check if the player goes in new action.
    {
     if ( player.Weapon == 27 || player.Weapon == 26)
     {
      player.Skin = player.Skin;
     }
    }
}

EK.IceFlake

Why the actual fuck do you want to disable the FPS aim? The devs worked so hard on FPS and this is what they are getting :(

Kewun

And what if someone doesnt like the FPS aim?

KAKAN

Quote from: Kewun on Aug 17, 2016, 08:44 AMAnd what if someone doesnt like the FPS aim?
Then he/she shouldn't play VCMP. That FPS looks funny, which is why I like it :p
oh no

MacTavish

Donno but i guess @KAKAN had made a mistake in code try testing this

function onPlayerActionChange( player, oldAction, newAction )
{
    if ( newAction == 12 && ( player.Weapon == 27 || player.Weapon == 26 ) ) return 0;
    else return 1;
}

Grand Hunting Project
Join #SLC, #KAKAN, #Doom, #GHP @LUnet

Retired VC:MP Player/Scripter :P