07.01.2011, 02:18
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;
}