IsPlayerInArea help
#1

First of all i want to say that i have searched for a solution to this problem several times and followed directions from several different posts and nothing ever changed. So when i enter the bank area i want it to give me a welcome message. Here is how i have it set up.

pawn Код:
forward AreaCheck();
pawn Код:
//under OnGameModeInit()

    SetTimer("AreaCheck",1000,true);
pawn Код:
public AreaCheck()
{
    for (new i; i < MAX_PLAYERS; i++)
    if(IsPlayerInArea(i,1717.8574,1725.7787,-1650.3363,-1659.9257))
    {
        SendClientMessage(i, COLOR_GREEN, "Welcome to the Bank!");
    }
    return 1;
}
pawn Код:
stock 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;
}
Reply


Messages In This Thread
IsPlayerInArea help - by [BFT]eagles22 - 07.01.2011, 02:18
Re: IsPlayerInArea help - by Alex_Valde - 07.01.2011, 02:22
Re: IsPlayerInArea help - by [BFT]eagles22 - 07.01.2011, 02:26
Re: IsPlayerInArea help - by admantis - 07.01.2011, 02:35
Re: IsPlayerInArea help - by [WF]Demon - 07.01.2011, 02:37
Re: IsPlayerInArea help - by [BFT]eagles22 - 07.01.2011, 04:05
Re: IsPlayerInArea help - by Kwarde - 07.01.2011, 04:42
Re: IsPlayerInArea help - by [BFT]eagles22 - 08.01.2011, 15:29
Re: IsPlayerInArea help - by Kwarde - 08.01.2011, 16:42
Re: IsPlayerInArea help - by [BFT]eagles22 - 08.01.2011, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)