again a isplayerinarea noob ^^
#1

Hello... i have this..

On the Top:
pawn Код:
forward CustomPickups(playerid);
stock IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
  //Min X Max X Min Y Max Y
  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;
}

Function to check the area
pawn Код:
public CustomPickups(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(IsPlayerInArea(i, 87.8908, -971.2684, 1345.357, -884.4181) || IsPlayerInArea(i, 698.8753, -1314.722, 812.9604, -1227.872))
             {
            TextDrawShowForPlayer(i, Textdraw);
             }
             else
             {
                 TextDrawHideForPlayer(i, Textdraw);
             }
        }
    }
}
the Error:
Код:
C:\DOKUME~1\Plato\Desktop\GM\EUROVE~1\GAMEMO~1\grl.pwn(32134) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Plato\Desktop\GM\EUROVE~1\GAMEMO~1\grl.pwn(32134) : warning 215: expression has no effect
C:\DOKUME~1\Plato\Desktop\GM\EUROVE~1\GAMEMO~1\grl.pwn(32134) : error 001: expected token: ";", but found "if"
knows anyone to fix that?
Reply


Messages In This Thread
again a isplayerinarea noob ^^ - by mirkoiz - 20.02.2009, 17:28
Re: again a isplayerinarea noob ^^ - by Daren_Jacobson - 20.02.2009, 17:45
Re: again a isplayerinarea noob ^^ - by ICECOLDKILLAK8 - 20.02.2009, 17:58
Re: again a isplayerinarea noob ^^ - by mirkoiz - 20.02.2009, 23:34
Re: again a isplayerinarea noob ^^ - by x-cutter - 21.02.2009, 00:47

Forum Jump:


Users browsing this thread: 1 Guest(s)