countdown for near players
#6

You need to use SetTimerEx to pass the playerid parameter to your countdown callback
pawn Code:
SetTimerEx("countdown", 1000, false, "i", playerid);
Also, just use IsPlayerInRangeOfPoint. I'm sure it's more optimized than the custom function you are using.
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
Reply


Messages In This Thread
countdown for near players - by Filbert - 18.05.2020, 00:31
Re: countdown for near players - by AzertyTheProgrammer - 18.05.2020, 00:58
Re: countdown for near players - by Ghazal - 18.05.2020, 01:25
Re: countdown for near players - by Filbert - 18.05.2020, 01:36
Re: countdown for near players - by Filbert - 19.05.2020, 19:40
Re: countdown for near players - by Grim_ - 19.05.2020, 23:25

Forum Jump:


Users browsing this thread: 1 Guest(s)