29.08.2015, 11:06
this code make's my game lag
PHP код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInArea(playerid,890.625, 503.90625, 2906.25, 2906.25)) //Same coords as your gangzone
{
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Location Gangzone", 3000, 3);
}
return 1;
}
stock IsPlayerInArea(playerid,Float:minX,Float:minY,Float:maxX,Float:maxY)
{
new Float:pX,Float:pY,Float:pZ;
GetPlayerPos(playerid,pX,pY,pZ);
if(pX >= minX && pX <= maxX && pY >= minY && pY <= maxY) return 1;
else return 0;
}