02.12.2014, 16:54
Quote:
And to give the weapon a player, I use this
pawn Код:
And to identify the damage pawn Код:
|
pawn Код:
GivePlayerWeapon(playerid, WEAPON_M4, 500);
M4Mode[ playerid ] = M4_AN94;
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
if(weaponid == WEAPON_M4) //if the weapon was M4
{
switch(M4Mode[ issuerid ]) //switch-checks for the m4 mode
{
case M4_AN94: SetPlayerHealth(playerid, HP-44); //if its an-94, take 44dmg
case M4_CAR15: SetPlayerHealth(playerid, HP-32); //if its car-15, take 32dmg
case M4_STEYRAUG: SetPlayerHealth(playerid, HP-38); //if its steyr-aug, take 38dmg
}
}
return 1;
}