[request] Verification
#1

Hello! I'm trying to make a check in my gamemode, you have a camera system in the first person, and when the player crouches (LETTER C), in the shots the player gets a great benefit, crouching without the camera in first person, I wonder how I can make this verification, there is something in the SA-MP which verifies that the person is crouching (check an animation?), as I thought to do with the letter C to squat, more if the person take a punch? does not work .. please someone help me? My code in progress:

PHP код:
    if(/*verification*/ && GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
    {
        if(
pUsarCamera[playerid] == 1)
        {
            if(
pPrimeiro[playerid] == 1)
            {
                
pPrimeiro[playerid] = 0;
                
CameraPrimeira(playerid0);
            }
        }
    } 
PHP код:
CameraPrimeira(playerid0); //activates the camera in first person 
Reply
#2

Maybe
https://sampwiki.blast.hk/wroot/index.ph..._holding_a_key

It will require the player to hold crouch, but otherwise the effect might stay even when the player stop crouching..
Reply
#3

Код:
if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_DUCK)
{
    //code
}
https://sampwiki.blast.hk/wiki/SpecialActions
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)