29.03.2019, 20:26
Can someone tell me why this code doesn't show the SpawnpointTD even if i'm at the spawnpoint?
RandomSpawn:
I tried with a simple SendClientMessage and it says i'm not at the spawnpoint, even if i spawn at RandomSpawn coordinates.
pawn Code:
for(new j; j < MAX_RANDOM_SPAWNS; j++)
{
if(IsPlayerInRangeOfPoint(i, 3, RandomSpawn[j][0], RandomSpawn[j][1], RandomSpawn[j][2]) && Player[i][PlayerSpawned] == true)
{
PlayerTextDrawShow(i, SpawnpointTD[i]);
}
else
{
PlayerTextDrawHide(i, SpawnpointTD[i]);
}
}
pawn Code:
static const Float:RandomSpawn[][4] =
{
{1320.7914,1262.0884,10.8203,357.0813},
{408.3192,2452.5623,16.5000,5.9386},
{-1321.2762,-219.7926,14.1484,12.5747 },
{1910.8484,-2419.6887,13.5391,182.4597},
{-2310.8376,-1616.5333,483.8190,176.1664},
{-2416.7188,332.4720,34.9688,240.4801},
}