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



Icon - Hunud - 25.03.2018

Icons are not global, it doesen't show anything on map.

Код:
 AirportZone[i][AP_ZONE_CP] = CreateDynamicMapIcon(AirportZone[i][AP_ZONE_CP][0], AirportZone[i][AP_ZONE_CP][1], AirportZone[i][AP_ZONE_CP][2], 5, 0, 0, MAPICON_GLOBAL);



Re: Icon - FaLLenGirL - 25.03.2018

When you spawn your interior ID and world ID it is setted to 0 ?
If the ID's of interior or world it is not setted, that's the problem, because your icon is in .worldid = 0, and .interiorid = 0.


Re: Icon - FuNkYTheGreat - 25.03.2018

Nope, fallenGirl you're wrong!
@Hunud
You did a problem in it's parameters, You've added MAPICON_GLOBAL instead of playerid and other params.
Fixed code.
Код:
AirportZone[i][AP_ZONE_CP] = CreateDynamicMapIcon(AirportZone[i][AP_ZONE_CP][0], AirportZone[i][AP_ZONE_CP][1], AirportZone[i][AP_ZONE_CP][2], 5, 0, -1 , -1 , -1 ,100.0, MAPICON_GLOBAL);
Here is CreateDynamicMapIcon parameters.
Код:
CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0, style = MAPICON_LOCAL);



Re: Icon - Hunud - 25.03.2018

No work. Same


Re: Icon - FuNkYTheGreat - 25.03.2018


I tried it in 0 , 0 , 0 coords and it's working fine, The code that i used.
Код:
	CreateDynamicMapIcon(0, 0,0, 5, 0, -1 , -1 , -1 ,100.0, MAPICON_GLOBAL);
Try doing it again, Check if the coords are valid or check server log if it's showing some sort of errors..


Re: Icon - Hunud - 25.03.2018

I did debug and it's showing in log here.

Код:
AirportZone[i][E_CAPTURE_ZONE_CP] = CreateDynamicMapIcon(AirportZone[i][E_APZONE][0], AirportZone[i][E_APZONE][1], AirportZone[i][E_APZONE][2], 18, 0, -1 , -1 , -1 , 100.0, MAPICON_GLOBAL);



Re: Icon - Hunud - 25.03.2018

Anyone knows what's the issue ?


Re: Icon - Lokii - 25.03.2018

did you load streamer and if yes does streamer load succesfully?


Re: Icon - Hunud - 25.03.2018

Yeah. Streamer is loaded and i'm using last version of it.


Re: Icon - FuNkYTheGreat - 25.03.2018

Hm, That's because 100 range is not enough to cover the whole sa, Replace 100.0 with 9999.0 (or above) Now where ever you goes you'll see it..

Fixed code.
Код:
AirportZone[i][E_CAPTURE_ZONE_CP] = CreateDynamicMapIcon(AirportZone[i][E_APZONE][0], AirportZone[i][E_APZONE][1], AirportZone[i][E_APZONE][2], 18, 0, -1 , -1 , -1 , 9999.0, MAPICON_GLOBAL);