SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 10/08/2012, 02:40 PM   #1
Strech
Huge Clucker
 
Strech's Avatar
 
Join Date: Jan 2012
Location: GetPlayerPos
Posts: 223
Reputation: 11
Default Need help with animations[+REP]

Any tutorial how to create animations and to make them stop using the Spacebar?
__________________

I hope you pay us a visit.
Strech is offline   Reply With Quote
Old 10/08/2012, 02:51 PM   #2
Strech
Huge Clucker
 
Strech's Avatar
 
Join Date: Jan 2012
Location: GetPlayerPos
Posts: 223
Reputation: 11
Default Re: Need help with animations[RP Gamemode]

Any ideas where i can learn alot for animations?
__________________

I hope you pay us a visit.
Strech is offline   Reply With Quote
Old 10/08/2012, 02:56 PM   #3
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 745
Reputation: 137
Default Re: Need help with animations[+REP]

Apply Animation using ApplyAnimation

pawn Code:
//To stop animation
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (PRESSED( KEY_SPRINT ))
        if(GetPlayerAnimationIndex(playerid)!=0)
            ClearAnimations(playerid);
    return 1;
}
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 10/08/2012, 02:57 PM   #4
AliveBG
Big Clucker
 
AliveBG's Avatar
 
Join Date: Apr 2012
Location: Bulgaria
Posts: 69
Reputation: 11
Default Re: Need help with animations[+REP]

read this ApplyAnimation and SetPlayerSpecialAction.

this is example:
PHP Code:
if(strcmp(cmdtext"/arrest"true) == 0)
{
    if(
GetPlayerState(playerid) == 1)
    {
       
ApplyAnimation(playerid"PED""ARRESTgun"4.00111, -1); // Gun Arrest
    
}
    return 
1;

Edit: [MM]RoXoR[FS] overtake me.

Last edited by AliveBG; 10/08/2012 at 03:39 PM.
AliveBG is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help me with animations !!! Yoshibre Scripting Help 5 23/09/2011 09:16 AM
[Help]Looking for animations help!! Ofnet Scripting Help 0 18/09/2011 04:14 PM
Animations Dannu13 Help Archive 4 17/12/2010 08:34 AM
NPC doesn't Use animations WSD Help Archive 0 15/06/2010 10:46 PM
Animations Bleach1 Help Archive 4 01/06/2010 12:29 PM


All times are GMT. The time now is 07:17 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.