Vice City: Multiplayer

Server Development => Scripting and Server Management => Topic started by: kokia on Oct 17, 2015, 07:04 AM

Title: crouch
Post by: kokia on Oct 17, 2015, 07:04 AM
how to disable crouch when a player crouched and tried to fire?
Title: Re: crouch
Post by: EK.IceFlake on Oct 17, 2015, 08:20 AM
Add this function
function onPlayerOnFireChange(player, firestatus)
{
    if (firestatus == true && player.IsCrouching == true)
    {
        player.SetAnim(0, 168);
    }
}
Beware of untestedness
Title: Re: crouch
Post by: KAKAN on Oct 17, 2015, 08:43 AM
Quote from: NE.CrystalBlue on Oct 17, 2015, 08:20 AMAdd this function
function onPlayerOnFireChange(player, firestatus)
{
    if (firestatus == true && player.IsCrouching == true)
    {
        player.SetAnim(0, 168);
    }
}
Beware of untestedness
LOL!
Use this:-
function onPlayerCrouchChange( player, IsCrouchingNow ) {
if( IsCrouchingNow == true ) return 0;
else return 1;
}
Title: Re: crouch
Post by: EK.IceFlake on Oct 17, 2015, 09:46 AM
@KAKAN
He said how to disable crouch when a player crouched and tried to fire?
Not how to disable crouch itself.