SA-MP Forums Archive
how can i apply a anim when player request class? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: how can i apply a anim when player request class? (/showthread.php?tid=285982)



how can i apply a anim when player request class? - razvanbrasov - 26.09.2011

how can i apply a anim when player request class ?? i was try
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
ApplyAnimation(playerid,"BEACH""ParkSit_M_loop"4.010000);
    
SetPlayerPos(playerid2.9660,28.3319,1200.0781);
    
SetPlayerCameraPos(playerid2.9660,30.3319,1200.0781);
    
SetPlayerCameraLookAt(playerid2.9660,28.3319,1200.0781);
    
SetPlayerInterior(playerid,1);
    
SetPlayerFacingAngle(playerid,2.2269);
    
ApplyAnimation(playerid,"BEACH""ParkSit_M_loop"4.010000);
    return 
1;

but in game doesn't work


Re: how can i apply a anim when player request class? - aRoach - 26.09.2011

OnPlayerConnect:
pawn Код:
ApplyAnimation(playerid,"BEACH", "ParkSit_M_loop", 4.0, 1, 0, 1, 0, 0);



Re: how can i apply a anim when player request class? - Issam - 26.09.2011

Quote:
Originally Posted by razvanbrasov
Посмотреть сообщение
how can i apply a anim when player request class ?? i was try
PHP код:
public OnPlayerRequestClass(playeridclassid)
{
    
ApplyAnimation(playerid,"BEACH""ParkSit_M_loop"4.010000);
    
SetPlayerPos(playerid2.9660,28.3319,1200.0781);
    
SetPlayerCameraPos(playerid2.9660,30.3319,1200.0781);
    
SetPlayerCameraLookAt(playerid2.9660,28.3319,1200.0781);
    
SetPlayerInterior(playerid,1);
    
SetPlayerFacingAngle(playerid,2.2269);
    
ApplyAnimation(playerid,"BEACH""ParkSit_M_loop"4.010000);
    return 
1;

but in game doesn't work
It should of work,How much classes do you HAVE One?
Then try switching to another class,then go back to your first class,it will work fine, it happend for me too
Delete the first " ApplyAnimation(playerid, blablabla)."
or /kill your self somehow and use F4,it will work if NOT repost.


Re: how can i apply a anim when player request class? - razvanbrasov - 26.09.2011

@aRoach thx for quick answer but doesn't work 2 /imageshack/img42/6060/samp000dq.png
@issam i wil tray


Re: how can i apply a anim when player request class? - aRoach - 26.09.2011

pawn Код:
public OnPlayerRequestClass( playerid, classid )
{
    SetPlayerPos( playerid, 2.9660, 28.3319, 1200.0781 );
    SetPlayerCameraPos(playerid, 2.9660, 30.3319, 1200.0781 );
    SetPlayerCameraLookAt(playerid, 2.9660, 28.3319, 1200.0781 );
    SetPlayerInterior( playerid, 1 );
    SetPlayerFacingAngle( playerid, 2.2269 );
    ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
    return ( 1 );
}



Re: how can i apply a anim when player request class? - razvanbrasov - 26.09.2011

@issam works when i change the class but i want that anim to star with out one player to do something


Re: how can i apply a anim when player request class? - vassilis - 26.09.2011

have u compile the script and it shows any warning?u might have put wrong library("BEACH")or wrong animation code