16.06.2010, 10:14
Look we used the function IsPlayerInArea :
public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
I put in OnPlayerSpawn :
if(IsPlayerInArea(playerid, -1591.064, 1702.824, -1741.078, 1539.302))
{
PD = TextDrawCreate(0.0, 434.0,"Police Departament Turf.");
TextDrawFont(PD,3);
TextDrawLetterSize(PD,10,10);
TextDrawColor(PD,0xF6F6F6FF);
TextDrawSetShadow(PD,1);
TextDrawSetOutline(PD,1);
TextDrawBackgroundColor(PD,0x000FF);
TextDrawUseBox(PD,0);
return 1;
}
The problem is that nothing is seen
public IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
if (x > minx && x < maxx && y > miny && y < maxy) return 1;
return 0;
}
I put in OnPlayerSpawn :
if(IsPlayerInArea(playerid, -1591.064, 1702.824, -1741.078, 1539.302))
{
PD = TextDrawCreate(0.0, 434.0,"Police Departament Turf.");
TextDrawFont(PD,3);
TextDrawLetterSize(PD,10,10);
TextDrawColor(PD,0xF6F6F6FF);
TextDrawSetShadow(PD,1);
TextDrawSetOutline(PD,1);
TextDrawBackgroundColor(PD,0x000FF);
TextDrawUseBox(PD,0);
return 1;
}
The problem is that nothing is seen