[0.3b] Help! OnPlayerRequestClass animation isnt working -
LiamM - 01.01.2011
Hey guys, Ok well OnPlayerRequestClass I have added the code
Код:
public OnPlayerRequestClass(playerid, classid)
{
ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.1,0,0,0,0,0,1);
SetPlayerPos(playerid, 1877.7783, -1361.9614, 14.6406);
SetPlayerFacingAngle(playerid, 179.8732);
SetPlayerCameraPos(playerid, 1877.7006, -1367.4792, 14.6406);
SetPlayerCameraLookAt(playerid, 1900.6584, -700.2100, 13.3000);
//Picking what gang the player wishes to join.
SetPlayerTeamFromClass(playerid, classid);
return 1;
}
Everything works except for the animation, The players still just stand there motionless. Any ideas on how to fix this?
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
Grim_ - 01.01.2011
Try looping the animation:
pawn Код:
ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.1,1,0,0,0,0,0);
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
OldDirtyBastard - 01.01.2011
As far as i know, the animation doesnt executes right away by connecting for some reason,
it starts only after you swich between some classes. Im thinking of a timer will might solve this.
pawn Код:
forward classanim(playerid);
public classanim(playerid)
{
ApplyAnimation(playerid,"DEALER","DEALER_IDLE",4.1,0,0,0,0,0,1);
return 1;
}
public OnPlayerRequestClass(playerid)
{
SetTimerEx("classanim", 2000, 0, "i", playerid);
return 1;
}
EDIT: Duh, didnt worked aswell. Sorry out of ideas.
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
LiamM - 01.01.2011
Hey I just noticed your edit but just wanted to say it didnt work, but thank you for trying anyway
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
LiamM - 01.01.2011
Grim_ I tried looping the animation, no luck :/
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
Grim_ - 01.01.2011
Are you sure the animation does something? "DEALER_IDLE" could mean just standing there in the 'dealer stance'.
Try it with other animations and see if they work, it could also be that animation not working correctly.
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
Hudgens - 01.01.2011
I just got this to work, here's how I did it
Код:
forward classanim(playerid);
public classanim(playerid)
{
ApplyAnimation(playerid,"STRIP","Strip_D",4.1,0,0,0,0,1);
return 1;
}
Then OnPlayerRequestClass
Код:
SetTimer("classanim",1000,0);
ApplyAnimation(playerid,"STRIP","strip_D",4,1,0,0,0,0,1);
I put it in middle of all my other variables in OnPlayerRequestClass but otherwise it would be
Код:
public OnPlayerRequestClass(playerid, classid);
{
SetTimer("classanim",1000,0);
ApplyAnimation(playerid,"STRIP","strip_D",4,1,0,0,0,0,1);
return 1;
}
Hope it works buddy
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
dice7 - 01.01.2011
Preload the animation libraries
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
blackwave - 01.01.2011
Try on 0.3c? 0.3c has been released already.
Re: [0.3b] Help! OnPlayerRequestClass animation isnt working -
LiamM - 02.01.2011
Quote:
Originally Posted by Hudgens
I just got this to work, here's how I did it
Код:
forward classanim(playerid);
public classanim(playerid)
{
ApplyAnimation(playerid,"STRIP","Strip_D",4.1,0,0,0,0,1);
return 1;
}
Then OnPlayerRequestClass
Код:
SetTimer("classanim",1000,0);
ApplyAnimation(playerid,"STRIP","strip_D",4,1,0,0,0,0,1);
I put it in middle of all my other variables in OnPlayerRequestClass but otherwise it would be
Код:
public OnPlayerRequestClass(playerid, classid);
{
SetTimer("classanim",1000,0);
ApplyAnimation(playerid,"STRIP","strip_D",4,1,0,0,0,0,1);
return 1;
}
Hope it works buddy
|
Hey man, I tried the code out and it wasnt successful I began to think it was the animation I was trying so I tried your one "STRIP, STRIP_D" but still no luck, The players just stand there still. Thank you very much for trying to help out though buddy