Detect run over a actor
#7

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
you stupid or what?
first just think a little bit how coding works even
I'm stupid, you are so smart

Quote:
Originally Posted by AdamsLT
Посмотреть сообщение
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamageActor
and
https://sampwiki.blast.hk/wiki/Weapons

The callback has a parameter weaponid. If the weapon is a car, the weaponid is 49.
So, when a player does damage to an actor with a vehicle, the callback would give weaponid 49. You should be able to do that check and do whatever you want with that data.

Is this what you are looking for?
Could you help me with that?

I've tried this:
Код:
public OnPlayerGiveDamageActor(playerid, damaged_actorid, Float: amount, weaponid, bodypart)
{
    if(weaponid == 49)
    {
        new string[128], attacker[MAX_PLAYER_NAME];
        new weaponname[24];
        GetPlayerName(playerid, attacker, sizeof (attacker));
        GetWeaponName(weaponid, weaponname, sizeof (weaponname));
     
        format(string, sizeof(string), "%s has made %.0f damage to actor id %d, weapon: %s", attacker, amount, damaged_actorid, weaponname);
        SendClientMessageToAll(0xFFFFFFFF, string);
    }
    return 1;
}
But nothing is printing

Thank you @Zeus666, but just ignore, that guy clearly have problems.
Reply


Messages In This Thread
Detect run over a actor - by binnyl - 26.04.2018, 06:26
Re: Detect run over a actor - by CodeStyle175 - 26.04.2018, 06:29
Re: Detect run over a actor - by AdamsLT - 26.04.2018, 07:51
Re: Detect run over a actor - by Zeus666 - 26.04.2018, 08:26
Re: Detect run over a actor - by CodeStyle175 - 26.04.2018, 08:52
Re: Detect run over a actor - by Zeus666 - 26.04.2018, 17:02
Re: Detect run over a actor - by binnyl - 29.04.2018, 05:15
Re: Detect run over a actor - by binnyl - 01.05.2018, 17:20
Re: Detect run over a actor - by jasperschellekens - 01.05.2018, 17:46
Re: Detect run over a actor - by binnyl - 02.05.2018, 02:26
Re: Detect run over a actor - by NaS - 02.05.2018, 10:20
Re: Detect run over a actor - by weex - 02.05.2018, 18:39
Re: Detect run over a actor - by git - 02.05.2018, 19:41
Re: Detect run over a actor - by XWolfX - 02.05.2018, 22:21

Forum Jump:


Users browsing this thread: 1 Guest(s)