Playermarker update
#1

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;
}
Reply
#2

not sure if this will work but try a timer.
Reply
#3

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.
Reply
#4

What to do then?
Reply
#5

bump.
Reply
#6

Can anyone help me please?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)