GangZone 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: GangZone Problem! (
/showthread.php?tid=454088)
GangZone Problem! -
rouzbeh - 27.07.2013
i have created many gangzones and i want to players can attack when they are in a turf
i want work my cmd only in a turf
i writen this public but not work ...
pawn Code:
public IsPlayerInTurf(playerid, turfid)
{
if(IsPlayerConnected(playerid))
{
new Float: x, Float:y, Float:z;
GetPlayerPos(playerid,x,y,z);
if((x >= TurfInfo[turfid][zMinX] && x <= TurfInfo[turfid][zMaxX]) && (y >= TurfInfo[turfid][zMinY] && y <= TurfInfo[turfid][zMaxY]))
{
return 1;
}
}
return -1;
}
whats the problem?