SA-MP Forums Archive
Info - 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: Info (/showthread.php?tid=656993)



Info - KinderClans - 29.07.2018

So, i have to create a mapicon and a textlabel. I have this coordinates:

pawn Код:
static const Float:AmmuCoords[][] =
{
    {286.1489, -40.6443, 1001.5156},
    {286.8009, -82.5475, 1001.5156},
    {296.9199, -108.0719, 1001.5156},
    {314.8209, -141.4319, 999.6015},
    {316.5249, -167.7069, 999.5937}
};
How i can do it by looping this array to create mapicon and textlabel without doing:

CreateDynamicMapIcon
CreateDynamic3dTextLabel
CreateDynamicMapIcon
CreateDynamic3dTextLabel
CreateDynamicMapIcon
CreateDynamic3dTextLabel

For every coordinate?

Thanks.


Re: Info - d1git - 29.07.2018

PHP код:
for(new 0sizeof AmmuCoords 1<= ji++) {
     
// AmmuCoords[i][0..1..2]
     
CreateDynamicMapIcon
     CreateDynamic3dTextLabel




Re: Info - KinderClans - 29.07.2018

Thank you but do you mind giving me a better example?


Re: Info - d1git - 29.07.2018

Quote:
Originally Posted by KinderClans
Посмотреть сообщение
Thank you but do you mind giving me a better example?
Better example? I literally gave you everything you needed to script it yourself.

PHP код:
for(new 0sizeof AmmuCoords 1<= ji++) { 
     
CreateDynamicMapIcon(AmmuCoords[i][0], AmmuCoords[i][1], AmmuCoords[i][2], 10);
     
CreateDynamic3DTextLabel("", -1AmmuCoords[i][0], AmmuCoords[i][1], AmmuCoords[i][2], 25.0);