19.05.2020, 23:25
You need to use SetTimerEx to pass the playerid parameter to your countdown callback
Also, just use IsPlayerInRangeOfPoint. I'm sure it's more optimized than the custom function you are using.
pawn Code:
SetTimerEx("countdown", 1000, false, "i", playerid);
pawn Code:
forward countdown(playerid);
public countdown(playerid)
{
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInRangeOfPoint(i, 200.0, x, y, z))
{
// rest of code