A question (+REP)
#4

Quote:
Originally Posted by TopShooter
Посмотреть сообщение
This one should work.

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    if(
weaponid == 22 || weaponid == 23 || weaponid == 24 || weaponid == 25 || weaponid == 26 || weaponid == 27 || weaponid == 28 || weaponid == 29 || weaponid == 30 || weaponid == 31 || weaponid == 32 || weaponid == 33 || weaponid == 34)
    {
        
ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0); // << Animation Example.
        // Your animation code here, applyanimation and etc.
    
}
    return 
1;

Why not switch?

PHP код:
public OnPlayerTakeDamage(playeridissueridFloat:amountweaponid)
{
    switch(
weaponid)
{
case 
22 .. 34:
    {
        
ApplyAnimation(playerid,"PED","KO_skid_front",4.1,0,0,0,0,0); // << Animation Example.
        // Your animation code here, applyanimation and etc.
    
}
}
    return 
1;

Reply


Messages In This Thread
A question (+REP) - by MarkNelson - 21.07.2016, 20:48
Re: A question (+REP) - by Mister0 - 21.07.2016, 21:00
Re: A question (+REP) - by MarkNelson - 21.07.2016, 23:30
Re: A question (+REP) - by oMa37 - 22.07.2016, 00:44

Forum Jump:


Users browsing this thread: 1 Guest(s)