Oh Help :D
#1

Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys < oldkeys)
    {
    	if(oldkeys - newkeys == KEY_SPRINT)
    	{
    	    ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
		}
    }
    else
    {
    	if(newkeys - oldkeys == KEY_SPRINT)
        {
            ApplyAnimation(playerid,"MUSCULAR", "MuscleSprint", 4.0, 1, 1, 1, 1, 1, 1);
        }
    }
	return 1;
}

I'm try with this code to change sprint, but isn't work, someone help me
Reply
#2

?
Reply
#3

Can you explain what you are trying to accomplish, more in-depth? With the code you provided, since it is, I assume, nothing of what you are trying to do, it is hard to figure out. If you are trying to apply the "CARRY" animation when the player presses the spring key:
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
   if( newkeys & KEY_SPRINT )
   {
      ApplyAnimation( playerid, "CARRY", "carry_prtial", 4.0, 0, 0, 0, 0, 0 );
   }
   return 1;
}
Please notice that it is recommended to use the bit-wise AND (&) instead of the logical AND (&&).
Reply
#4

Ya! i mean change the carry to normal sprint like (CJ)
Reply
#5

pawn Код:
UsePlayerPedAnims();//inside OnGamemodeInit.
Reply
#6

I'm still kind of lost, unfortunately. You would like it so all players run like the CJ skin? Assuming so, there is one function that will toggle the way players hold and run with weapons. Normally, they would run with them down and to their sides, with the use of the function, they will run how CJ does in single player mod.
pawn Код:
UsePlayerPedAnims( );
You can place that code under the OnGameModeInit callback. Please test the code and see if that is what you were looking for.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)