28.02.2018, 13:27
How to identify players attack by means
I want to make the player attack someone by car, then automatically kick off the server
|
public OnPlayerDeath(playerid, killerid, reason)
{
if(reason == 49) // if weapon id is a vehicle
{
Kick(killerid);//kick killer id
}
return 1;
}
Are you sure? what if someone accidentally crashes into someone? He gets kicked.. You might want to do it onplayerdeath.
PHP код:
|
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(weaponid == 49)
{
Kick(issuerid);
}
return 1;
}