animation
#1

i have this code but animation does not work in first time.

Код:
stock EnterRoLsBurgershot1(playerid){
    UnderRob[RoLsBurgershot1] = 1;
    SendClientMessage(playerid,COLOR_WHITE,"You're {f50000}stealing {FFFFFF}from {00FF22}LsBurgershot1.");
    SetPlayerPos(playerid,376.3532,-65.1812,1001.5078);
    SetPlayerFacingAngle(playerid,93.0549);
    ApplyAnimation(playerid,"ROB_BANK","CAT_Safe_Rob",4.1,1,0,0,1,10,1);
	RobTimer[playerid][RoLsBurgershot1]=SetTimerEx("RoLsBurgershot1Timer",10000,false,"i",playerid);
	return 1;}
Код:
public RoLsBurgershot1Timer(playerid){
	UnderRob[RoLsBurgershot1] = 0;
	ClearAnimations(playerid);
	return 1;}
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys){
    if(newkeys & KEY_WALK){
    	if(IsPlayerInDynamicCP(playerid, CP[RoLsBurgershot1])){
    		if(UnderRob[RoLsBurgershot1] == 1)return SendClientMessage(playerid,COLOR_WHITE,"{FFFFFF}[{f50000}ERROR{FFFFFF}]This shop is {f50000}stolen.");
			EnterRoLsBurgershot1(playerid);
			return 1;}}
	return 1;}
Reply
#2

Preload animation libraries. Some require a second ApplyAnimation to work the first time.
Reply
#3

how?
Reply
#4

Add the following under OnPlayerSpawn:

pawn Код:
ApplyAnimation(playerid, "ROB_BANK", "null", 0, 0, 0, 0, 0, 1);
or simply call the function twice.
Reply
#5

and how to freeze player when use animation?camera can move.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)