Posts: 127
Threads: 43
Joined: May 2014
Reputation:
0
Hello. How to make like, when a player kills someone on the spawn, that player who killed, gets automaticly killed for killing other player on spawn?
I don't want spawn protection for seconds, I need that the killer player could be automaticly killed.
Posts: 127
Threads: 43
Joined: May 2014
Reputation:
0
Sorry, but that does not work..
Posts: 171
Threads: 33
Joined: Sep 2015
Reputation:
0
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLos t,Float:ArmourLost)
{
if (IsPlayerInRangeOfPoint(Target, 2.0, ZombieSpawnX, ZombieSpawnY, ZombieSpawnZ))
{
new Float:health;
GetPlayerHealth(Shooter,health);
SetPlayerHealth(Shooter, health-5);
}
return 1;
}
Posts: 78
Threads: 15
Joined: Aug 2015
Reputation:
0
public OnPlayerDeath(playerid, killerid, reason)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
SetPlayerHealth(killerid,0);
}
return 1;
}
Posts: 127
Threads: 43
Joined: May 2014
Reputation:
0
Nothing worked.. I just saw this kind of feature in one zombie server, where for example, team human kills a team zombie on their spawn, team human gets auto-killed for doing that. There is mapchange system, after when every certain time ends, the new round starts and map changes, so as the team spawns.