04.07.2015, 18:40
Hello! I tried OnPlayerGiveDamage but it doesn't work when i fire with seasparrow. Is there a way to detect the amount of damage given by SeaSparrow?
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID && weaponid == 31 && IsPlayerInVehicle(issuerid, 447)) { new Float:hp; GetPlayerHealth(playerid, hp); SetPlayerHealth(playerid, hp + amount); } return 1; } |
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) {
if(weaponid == 38 && IsPlayerInAnyVehicle(issuerid) && GetVehicleModel(GetPlayerVehicleID(issuerid)) == VEHICLE_SEASPARROW) {
// player has taken damage from seasparrow
}
return 1;
}
pawn Код:
|
i think you have to make it on OnPlayerTakeDamage
IM NOT SURE IF WORK |