SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Tools and Files

Reply
 
Thread Tools Display Modes
Old 24/04/2017, 12:14 PM   #201
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,075
Reputation: 185
Default Re: SanMap - San Andreas in ****** Maps

You're creating one big polygon, create separate polygons instead.
__________________
Greetings,
Tim Potze

On vacation August 2nd to September 1st

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in ****** Maps! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 24/04/2017, 12:20 PM   #202
Johhnyllll
Huge Clucker
 
Johhnyllll's Avatar
 
Join Date: Sep 2014
Posts: 205
Reputation: 8
Default Re: SanMap - San Andreas in ****** Maps

Quote:
Originally Posted by ikkentim View Post
You're creating one big polygon, create separate polygons instead.
I have 104 gang zones. I don't want, for each one create a separate variable...
Need to find an alternative solution, if it exists of course...
__________________
: GitHub
Johhnyllll is offline   Reply With Quote
Old 24/04/2017, 12:21 PM   #203
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,075
Reputation: 185
Default Re: SanMap - San Andreas in ****** Maps

Quote:
Originally Posted by Johhnyllll View Post
I have 104 gang zones. I don't want, for each one create a separate variable...
Need to find an alternative solution, if it exists of course...
use an array, or otherwise, simply do not keep a reference to them outside of your for/each loop.
__________________
Greetings,
Tim Potze

On vacation August 2nd to September 1st

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in ****** Maps! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 24/04/2017, 12:39 PM   #204
Johhnyllll
Huge Clucker
 
Johhnyllll's Avatar
 
Join Date: Sep 2014
Posts: 205
Reputation: 8
Default Re: SanMap - San Andreas in ****** Maps

Quote:
Originally Posted by ikkentim View Post
use an array, or otherwise, simply do not keep a reference to them outside of your for/each loop.
Have done so:
PHP Code:
    var GangZone = {
        
'array' : [
            
SanMap.getLatLngFromPos(1849.3774, -1054.2593),
            
SanMap.getLatLngFromPos(2069.4177, -1054.2593),
            
SanMap.getLatLngFromPos(2069.4177, -945.2972),
            
SanMap.getLatLngFromPos(1849.3774, -945.2972)],
        
'first' : [
            
SanMap.getLatLngFromPos(2069.4177, -1108.9666),
            
SanMap.getLatLngFromPos(2175.5276, -1108.9666),
            
SanMap.getLatLngFromPos(2175.5276, -945.2972),
            
SanMap.getLatLngFromPos(2069.4177, -945.2972),
        ]
    };
    var 
polygon1 = new ******.maps.Polygon({
        
pathGangZone['array','first'],
        
strokeColor'#FF0000',
        
strokeOpacity1.0,
        
strokeWeight1,
        
mapmap
    
});
    
zone.setMap(map); 
But on the map there is only the last gang area
__________________
: GitHub
Johhnyllll is offline   Reply With Quote
Old 24/04/2017, 12:41 PM   #205
ikkentim
High-roller
 
ikkentim's Avatar
 
Join Date: Jan 2010
Location: Kampen, The Netherlands
Posts: 1,075
Reputation: 185
Default Re: SanMap - San Andreas in ****** Maps

You still need separate polygons ಠ_ಠ
__________________
Greetings,
Tim Potze

On vacation August 2nd to September 1st

Projects
GAMEDEV | Part-time developer working on Parkitect. | Steampage
LSRES | A SA:MP server from the past, and hopefully, back in the future.
SampSharp | Plugin for writing SA:MP gamemodes in C#. | Topic Website Github
SanMap | San Andreas in ****** Maps! | Topic Github Sample
ikkentim is offline   Reply With Quote
Old 24/04/2017, 12:44 PM   #206
Johhnyllll
Huge Clucker
 
Johhnyllll's Avatar
 
Join Date: Sep 2014
Posts: 205
Reputation: 8
Default Re: SanMap - San Andreas in ****** Maps

Quote:
Originally Posted by ikkentim View Post
You still need separate polygons ಠ_ಠ
I did it, thank you..
__________________
: GitHub
Johhnyllll is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Off] ****** Maps Troll Panico622 Portugus/Portuguese 15 26/08/2012 02:37 AM
****** Maps payton326 Everything and Nothing 1 17/09/2011 01:11 PM
****** Maps > San Andreas Maps? BMUK Help Archive 4 10/02/2010 04:26 PM
[HTML][GMA] San Andreas map (****** maps api) kacperoo Help Archive 2 11/04/2009 09:34 PM


All times are GMT. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.