Quote:
Originally Posted by TopShooter
This one should work.
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
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(playerid, issuerid, Float:amount, weaponid)
{
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;
}