SA-MP Forums Archive
SetPlayerMarkerForPlayer doesn't seem to be working - 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: SetPlayerMarkerForPlayer doesn't seem to be working (/showthread.php?tid=542443)



SetPlayerMarkerForPlayer doesn't seem to be working - Beckett - 19.10.2014

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.


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Beckett - 19.10.2014

Bump.....?


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Kaperstone - 19.10.2014

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

As I understood, it works only once.


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Vince - 20.10.2014

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


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Beckett - 23.10.2014

------


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Beckett - 05.11.2014

------


Re: SetPlayerMarkerForPlayer doesn't seem to be working - BroZeus - 06.11.2014

Well what it prints now?


Re: SetPlayerMarkerForPlayer doesn't seem to be working - Beckett - 06.11.2014

------