How I can check if a player death in a gang zone? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How I can check if a player death in a gang zone? (
/showthread.php?tid=71978)
How I can check if a player death in a gang zone? -
CTCCoco - 05.04.2009
How I can check if a player death in a gang zone? I know how to use but in OnPlayerDeath Dont work, WHY?
Please help me... Thanks for all....
Re: How I can check if a player death in a gang zone? -
Danut - 05.04.2009
Use IsPlayerInArea
Re: How I can check if a player death in a gang zone? -
dre$tA - 05.04.2009
Add this into your script and use the same Float's as in with your gangzone:
Код:
IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
Example, with guessing you have gangzone created already:
Код:
GangZoneCreate(100, 300, 500, 400);
public OnPlayerDeath(playerid, killerid, reason)
{
IsPlayerInArea(playerid, 100, 500, 300, 400);
{
// do something maybe :o
}
}