Dynamic area problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dynamic area problem (
/showthread.php?tid=657225)
Dynamic area problem -
MRM - 03.08.2018
When the player dies in the area, he is killed again in spawn point.
How to fix it?
PHP код:
public OnPlayerLeaveDynamicArea(playerid, areaid)
{
if(Spawn[playerid] == 0) return 1;
new gangid = PlayerGang[playerid][gang_id];
if(gangid != -1)
{
for(new i=0;i<MAX_GANG_ZONE;i++)
{
if(areaid == GZone[i][gArea] && GZone[i][gzoneStatus] == 2 && Gang[gangid][gangAttack] && Gang[gangid][gangZoneAttackID] == i && IsSpawned[playerid])
{
SetPlayerHealth(playerid,0.0);
}
}
}
return 1;
}
Re: Dynamic area problem -
MRM - 03.08.2018
Yes.
So how to fix it ?
I insert
OnPlayerDeath
Spawn[playerid] = 0
And
OnPlayerSpawn
Spawn[playerid] = 1
But nothing....