Help with my placemine command
#2

This is more for information for you, over all... Not really a fix for your situation.

Quote:
Originally Posted by Ramblings
You may have some luck and more ease using the zone streamer to create and delete zones, and use the OnPlayerEnterDynamicArea, OnPlayerLeaveDynamicArea (I THINK those are the callbacks it introduces).

https://sampforum.blast.hk/showthread.php?tid=102865

It'll simply mean you don't need to really have the timer, as the plugin will do that for you. However in saying that, you'll also need to redo your 3dtext to the streamers functions as it also streams those as well.

Don't confuse PlayerTextDraw for 3DText.

With the streamer you can make areas that are cylinders around the mines.

1 being 10, another being 2 on each mine. This will give you a callback situation for each of your mines, and not rely so much on the timer.
pawn Код:
else if(!IsPlayerInRangeOfPoint(i, 10.0, MinePos[playerid][0], MinePos[playerid][1], MinePos[playerid][2]))
        {
// Not needed           format(string,sizeof(string),"MINE HERE");
// Not needed           UpdatePlayer3DTextLabelText(i,MineLabel[i], COLOR_INDIANRED, string);
            PlayerTextDrawHide(i,MineBar[i]);
            DestroyPlayerProgressBar(i,MineBar2[i]);
           
        }
https://sampwiki.blast.hk/wiki/PlayerTextDrawHide

Only destroy it on disconnection, you can re-use the textdraws, and update them to show the color change.

You don't need to update its contents if you're only going to hide it. You will update it when you get close again.
Reply


Messages In This Thread
Help with my placemine command - by Nabster - 23.03.2015, 02:16
Re: Help with my placemine command - by Sew_Sumi - 23.03.2015, 03:12
Re: Help with my placemine command - by Nabster - 23.03.2015, 03:32
Re: Help with my placemine command - by Sew_Sumi - 23.03.2015, 04:20

Forum Jump:


Users browsing this thread: 1 Guest(s)