SA-MP Forums Archive
Leg Breaking Animation help +rep - 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: Leg Breaking Animation help +rep (/showthread.php?tid=601420)



Leg Breaking Animation help +rep - Matical - 21.02.2016

-fixed-


Re: Leg Breaking Animation help +rep - ReshiramZekrom - 21.02.2016

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 Код:
// 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 Код:
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 Код:
ApplyAnimation(playerid,"ped","null",0.0, 0, 0, 0, 0, 0);



Re: Leg Breaking Animation help +rep - Threshold - 21.02.2016

EDIT: Dat awkward late post...

(Don't leave your tabs open kids!)


Re: Leg Breaking Animation help +rep - ReshiramZekrom - 21.02.2016

Quote:
Originally Posted by Threshold
Посмотреть сообщение
EDIT: Dat awkward late post...

(Don't leave your tabs open kids!)
What is the purpose of this comment?


Re: Leg Breaking Animation help +rep - Joron - 21.02.2016

Quote:
Originally Posted by ReshiramZekrom
Посмотреть сообщение
What is the purpose of this comment?
He commented somerthing similar... before


Re: Leg Breaking Animation help +rep - ReshiramZekrom - 21.02.2016

Quote:
Originally Posted by Joron
Посмотреть сообщение
He commented somerthing similar... before
Oh okay, lol I didn't figured it out. Thanks for the explanation


Re: Leg Breaking Animation help +rep - Matical - 27.02.2016

bump/


Re: Leg Breaking Animation help +rep - Sew_Sumi - 27.02.2016

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.