27.07.2013, 17:54
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 ...
whats the problem?
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;
}