15.10.2011, 01:43
This code should expel a player who loses no life
but expels an innocent player
the idea is to expel a player who loses no life
that should be corrected?
The code by Josta Using Include OnPlayerShootPlayer by wups
but expels an innocent player
the idea is to expel a player who loses no life
that should be corrected?
The code by Josta Using Include OnPlayerShootPlayer by wups
pawn Код:
new Float:vida[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
vida[playerid] = 100.0;
return 1;
}
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(floatcmp(vida[Target],HealthLost))
{
Kick(Target);
return 1;
}
vida[Target] = HealthLost;
return 1;
}