SA-MP Forums Archive
[Include] Map icons - AttachMapIconTo*STUFF*(..); - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] Map icons - AttachMapIconTo*STUFF*(..); (/showthread.php?tid=422558)



Map icons - AttachMapIconTo*STUFF*(..); [V0.5] - CreativityLacker - 14.03.2013

Map icons - V0.5



This is the FIRST BETA of map icons enhancement, and currently has only 2 simple functions -
V0.50 released

pawn Код:
AttachMapIconToVehicle(iconid, vehicleid, markertype, color, style)
GetIconType(iconid)
AttachMapIconToObject(iconid, objectid, markertype, color, style);
AttachMapIconToPlayer(iconid, objectid, markertype, color, style);
DeattachMapIconFromEverything(iconid);
And as for now I'm working on -

pawn Код:
DestroyMapIcon(iconid);
GetUsedIcons()
GetUnusedIcons()
GetUnusedIconID()
These are probably gonna be released by tomorrow morning.

I've tested it myself and it works perfectly fine for now, report any bugs/performance issues within the few hours, I've done this in about an hour, so don't criticize, feel free to report any immediate bugs.

If you know a better way to do these, feel free to suggest, this is just the FIRST BUILD, the very basic structure, I'm working on a better one, stay tuned.

http://www.mediafire.com/download.php?ljx1ebqz3flwlf3
V0.50 = http://www.mediafire.com/download.php?k57b18qdoy29dr1
V0.50 = http://pastebin.com/rhqz9C6b


GetMapIconType()

returns -

TYPE_NORMAL (0) if MAP ICON IS NOT ATTACHED TO ANYTHING
TYPE_ATTACHED_TO_VEHICLE (1) if MAP ICON IS ATTACHED TO CAR
TYPE_ATTACHED_TO_OBJECT (2) if MAP ICON IS ATTACHED TO OBJECT
TYPE_ATTACHED_TO_PLAYER (3) if MAP ICON IS ATTACHED TO PLAYER



Re: Map icons - AttachMapIconTo*STUFF*(..); - Ballu Miaa - 14.03.2013

Seems good Shivam. Will love to use it for my servers. Thanks. Rep+4


Re: Map icons - AttachMapIconTo*STUFF*(..); - Niko_boy - 14.03.2013

ah nice script , had this idea in mind but didnt made it out cuz of thing there is limit of 99 icons :'|
also this:
Код:
#define GetIconType(%1) MapIcon[%1][TypeOfIcon]
could be a bit better though , nvm good work keep it up!
also a pastebin link plz :P ?


Re: Map icons - AttachMapIconTo*STUFF*(..); - CreativityLacker - 14.03.2013

Thanks for +ve feedback.
Updated to V0.50
Added -
pawn Код:
Attach to objects
Attach to players
Remove from objects,players and vehicles



Re: Map icons - AttachMapIconTo*STUFF*(..); - iFear - 14.03.2013

Very Nice Include.
+1 Rep


Re: Map icons - AttachMapIconTo*STUFF*(..); - iFear - 14.03.2013

REMOVED<>

EDIT : Didn't did on Purpose. My Net is Bugged! 2Post in 1time.


Re: Map icons - AttachMapIconTo*STUFF*(..); - Kar - 14.03.2013

pastebin?


Re: Map icons - AttachMapIconTo*STUFF*(..); - CreativityLacker - 14.03.2013

Quote:
Originally Posted by Kar
Посмотреть сообщение
pastebin?
Added.


Re: Map icons - AttachMapIconTo*STUFF*(..); - Shevil - 07.07.2014

what this?


Re: Map icons - AttachMapIconTo*STUFF*(..); - NewerthRoleplay - 07.07.2014

Quote:
Originally Posted by Shevil
Посмотреть сообщение
what this?
Not sure why you bumped a year old thread just to ask this, however upon reading the first post it allows you to attach Map Icon's to players vehicles etc. So the icon moves around with them using a timer.