SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 21/02/2016, 07:21 AM   #1
Matical
Big Clucker
 
Join Date: Aug 2015
Posts: 69
Reputation: 1
Default Leg Breaking Animation help +rep

-fixed-

Last edited by Matical; 30/05/2016 at 08:17 PM.
Matical is offline   Reply With Quote
Old 21/02/2016, 11:56 AM   #2
ReshiramZekrom
Big Clucker
 
ReshiramZekrom's Avatar
 
Join Date: May 2012
Location: Bari, Italy
Posts: 133
Reputation: 14
Default Re: Leg Breaking Animation help +rep

You need to preload animations. You can use this code but I tested that he might cause crashes and huge lag on some players..

pawn Code:
// Not made by me - by [HuN]_Epsilon
new AnimLibraies[129][14] =
{
    "AIRPORT","Attractors","BAR","BASEBALL","BD_FIRE","BEACH","benchpress","BF_injection","BIKED","BIKEH",
    "BIKELEAP","BIKES","BIKEV","BIKE_DBZ","BLOWJOBZ","BMX","BOMBER","BOX","BSKTBALL","BUDDY","BUS","CAMERA",
    "CAR","CARRY","CAR_CHAT","CASINO","CHAINSAW","CHOPPA","CLOTHES","COACH","COLT45","COP_AMBIENT","COP_DVBYZ",
    "CRACK","CRIB","DAM_JUMP","DANCING","DEALER","DILDO","DODGE","DOZER","DRIVEBYS","FAT","FIGHT_B","FIGHT_C",
    "FIGHT_D","FIGHT_E","FINALE","FINALE2","FLAME","Flowers","FOOD","Freeweights","GANGS","GHANDS","GHETTO_DB",
    "goggles","GRAFFITI","GRAVEYARD","GRENADE","GYMNASIUM","HAIRCUTS","HEIST9","INT_HOUSE","INT_OFFICE",
    "INT_SHOP","JST_BUISNESS","KART","KISSING","KNIFE","LAPDAN1","LAPDAN2","LAPDAN3","LOWRIDER","MD_CHASE",
    "MD_END","MEDIC","MISC","MTB","MUSCULAR","NEVADA","ON_LOOKERS","OTB","PARACHUTE","PARK","PAULNMAC","ped",
    "PLAYER_DVBYS","PLAYIDLES","POLICE","POOL","POOR","PYTHON","QUAD","QUAD_DBZ","RAPPING","RIFLE","RIOT",
    "ROB_BANK","ROCKET","RUSTLER","RYDER","SCRATCHING","SHAMAL","SHOP","SHOTGUN","SILENCED","SKATE","SMOKING",
    "SNIPER","SPRAYCAN","STRIP","SUNBATHE","SWAT","SWEET","SWIM","SWORD","TANK","TATTOOS","TEC","TRAIN","TRUCK",
    "UZI","VAN","VENDING","VORTEX","WAYFARER","WEAPONS","WUZI"
};

public OnPlayerSpawn(playerid) {
    // [HuN]_Epsilon
    if (!GetPVarType(playerid, "anims_loaded")) {
        SetPVarInt(playerid, "anims_loaded", 1);
        for(new i; i < 129; ++i) ApplyAnimation(playerid, AnimLibraies[i], "null", 0.0, 0, 0, 0, 0, 0);
    }
    return 1;
}


Alternatively, I'm not sure that it will works but try to put in OnPlayerSpawn
pawn Code:
ApplyAnimation(playerid,"PED","FALL_collapse",4.0,0,0,0,0,1);
. Some anims needs to be executed twice to work


If it still doesn't work try to put this one in OnPlayerSpawn:
pawn Code:
ApplyAnimation(playerid,"ped","null",0.0, 0, 0, 0, 0, 0);
__________________
ReshiramZekrom is offline   Reply With Quote
Old 21/02/2016, 12:17 PM   #3
Threshold
High-roller
 
Threshold's Avatar
 
Join Date: Nov 2012
Location: Australia
Posts: 3,105
Reputation: 523
Default Re: Leg Breaking Animation help +rep

EDIT: Dat awkward late post...

(Don't leave your tabs open kids!)
__________________

Kar's Cops and Robbers 2019
Threshold is offline   Reply With Quote
Old 21/02/2016, 12:40 PM   #4
ReshiramZekrom
Big Clucker
 
ReshiramZekrom's Avatar
 
Join Date: May 2012
Location: Bari, Italy
Posts: 133
Reputation: 14
Default Re: Leg Breaking Animation help +rep

Quote:
Originally Posted by Threshold View Post
EDIT: Dat awkward late post...

(Don't leave your tabs open kids!)
What is the purpose of this comment?
__________________
ReshiramZekrom is offline   Reply With Quote
Old 21/02/2016, 01:09 PM   #5
Joron
Huge Clucker
 
Joron's Avatar
 
Join Date: Nov 2015
Location: Behind My PC
Posts: 378
Reputation: 113
Default Re: Leg Breaking Animation help +rep

Quote:
Originally Posted by ReshiramZekrom View Post
What is the purpose of this comment?
He commented somerthing similar... before
Joron is offline   Reply With Quote
Old 21/02/2016, 01:12 PM   #6
ReshiramZekrom
Big Clucker
 
ReshiramZekrom's Avatar
 
Join Date: May 2012
Location: Bari, Italy
Posts: 133
Reputation: 14
Default Re: Leg Breaking Animation help +rep

Quote:
Originally Posted by Joron View Post
He commented somerthing similar... before
Oh okay, lol I didn't figured it out. Thanks for the explanation
__________________
ReshiramZekrom is offline   Reply With Quote
Old 27/02/2016, 08:57 PM   #7
Matical
Big Clucker
 
Join Date: Aug 2015
Posts: 69
Reputation: 1
Default Re: Leg Breaking Animation help +rep

bump/
Matical is offline   Reply With Quote
Old 27/02/2016, 09:05 PM   #8
Sew_Sumi
Banned
 
Join Date: Jun 2008
Location: Azerbaijan
Posts: 6,268
Reputation: 525
Default Re: Leg Breaking Animation help +rep

You should check what key is being pressed, then check in there if their leg is broken.

Then you can use that key, again, in another situation without having to put another if newkeys of the same key.
Sew_Sumi 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
Breaking rcon BossArturKA Server Support 2 08/01/2014 04:58 PM


All times are GMT. The time now is 06:44 AM.


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