SA-MP Forums Archive
Playermarker update - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Playermarker update (/showthread.php?tid=409369)



Playermarker update - Mikkel_RE - 21.01.2013

Hey, how do i make the playermaker update every 5 second? because when it is like that, the marker will dissappear after some time.

Код:
stock ShowGang(playah,gang)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pGang] == gang && !PlayerInfo[i][pBanished])
        {
            SetPlayerMarkerForPlayer(i, playah, 0xFFFFFFAA);
            SetPlayerMarkerForPlayer(playah, i, 0xFFFFFFAA);
            SetTimerEx("HideGang", 1000, false, "ii", playah, gang);
		}
	}
	return 1;
}
Код:
public HideGang(playah,gang){
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && PlayerInfo[i][pGang] == gang && !PlayerInfo[i][pBanished])
        {
            SetPlayerMarkerForPlayer(i, playah, 0xFFFFFFAA);
			SetPlayerMarkerForPlayer(playah, i, 0xFFFFFFAA);
        }
    }
    return 1;
}



Re: Playermarker update - Infinity90 - 21.01.2013

not sure if this will work but try a timer.


Re: Playermarker update - Riddick94 - 21.01.2013

pawn Код:
SetTimerEx("HideGang", 1000, false, "ii", playah, gang);
If you want to update player marker every 5 seconds, then you can't set timer to loop only once and the time should count every five seconds, no one second like you typed.


Re: Playermarker update - Mikkel_RE - 21.01.2013

What to do then?


Re: Playermarker update - Mikkel_RE - 21.01.2013

bump.


Re: Playermarker update - Mikkel_RE - 21.01.2013

Can anyone help me please?