SetPlayerMarkerForPlayer doesn't seem to be working
#1

pawn Код:
if(PRESSED(KEY_ACTION))
    {
        if(PlayerInfo[playerid][Team] == 2)
        {
            if(GetPlayerProgressBarValue(playerid, SniffBar[playerid]) >= 100)
            {
                new radius;
                if(PlayerInfo[playerid][Avar] == 1) { radius = 50; }
                else if(PlayerInfo[playerid][Avar] == 2) { radius = 100; }
                else if(PlayerInfo[playerid][Avar] == 3) { radius = 150; }
                new Float:x,Float:y,Float:z;
                new secs;
                if(PlayerInfo[playerid][Avar] == 1) { secs = 3000; }
                if(PlayerInfo[playerid][Avar] == 2) { secs = 4000; }
                if(PlayerInfo[playerid][Avar] == 3) { secs = 5000; }
                foreach(Player,i)
                {
                    if(i == playerid) continue;
                    if(IsPlayerInRangeOfPoint(i,radius,x,y,z))
                    {
                        if(PlayerInfo[i][Team] == 1)
                        {
                            //SetPlayerMarkerForPlayer(i,playerid,YELLOW); //0xFFFB00FF
                            SetPlayerMarkerForPlayer(playerid,i,YELLOW);
                            print("player is team 1");
                        }
                        else if(PlayerInfo[i][Team] == 2)
                        {
                            SetPlayerMarkerForPlayer(playerid,i,GREEN); // 0x0F7002FF
                            print("player is team 2");
                        }
                    }
                    else
                    {
                        printf(" player %i not near",i);
                    }

                }
                SetTimerEx("Sniff",secs,0,"d",playerid);
                SetPlayerProgressBarValue(playerid,SniffBar[playerid],0);
                UpdatePlayerProgressBar(playerid,SniffBar[playerid]);
                ApplyAnimation(playerid,"PED","flee_lkaround_01",4.1,0,0,0,0,-1,0);
            } else { print(" -100 "); }
        } else { print(" team not 2"); }
        return 1;
    }
Well title says it all, basically when a player presses his action key it will check if his Avar is 1/2/3 then do the radius according to his Avar. I guess everything is clear, but afterwards SetPlayerMarkerForPlayer doesn't work.
Thanks in advance.
Reply
#2

Bump.....?
Reply
#3

In what way it doesn't work ?
doesn't disapear, doesn't apear.

As I understood, it works only once.
Reply
#4

You define x, y, z but never actually put anything useful in it.
Reply
#5

------
Reply
#6

------
Reply
#7

Well what it prints now?
Reply
#8

------
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)