run over actor
#1

I'm really need to detect to when player run over a actor...

Is anybody know how to do it?

I need to destroy actor after drive by a player!
Reply
#2

bump
Reply
#3

You can use this include:
https://sampforum.blast.hk/showthread.php?tid=573504

PHP код:
forward OnActorDeath(actoridkilleridreason); 
So with that you can detect if the actor has died by a vehicle.
reason will be the weapon id:
https://sampwiki.blast.hk/wiki/Weapons

The weapon id of a vehicle kill is 49. So you could do something like this:
PHP код:
public OnActorDeath(actoridkilleridreason)
{
if(
reason == 49)
{
//actor was killed by vehicle
}
return 
1;

Reply
#4

Quote:
Originally Posted by jasperschellekens
Посмотреть сообщение
You can use this include:
https://sampforum.blast.hk/showthread.php?tid=573504

PHP код:
forward OnActorDeath(actoridkilleridreason); 
So with that you can detect if the actor has died by a vehicle.
reason will be the weapon id:
https://sampwiki.blast.hk/wiki/Weapons

The weapon id of a vehicle kill is 49. So you could do something like this:
PHP код:
public OnActorDeath(actoridkilleridreason)
{
if(
reason == 49)
{
//actor was killed by vehicle
}
return 
1;

public OnActorDeath(actorid, killerid, reason)
{
if(reason == 49)

Using this include, it will never enter on this IF
if(reason == 49)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)