[INC/FS] Carlton's MapIcon Streamer | Version 2.0 | 16 functions
#1

Hello everyone, this is my 3rd release and i'm starting to get the hang out PAWN now. I came across a object streamer by » RyDeR « located: http://forum.sa-mp.com/index.php?topic=125657.0 I was interested in the uniqueness and brillant idea of a streamer, I wanted to script one myself, I looked at the streamer topic, and noticed there was Map icon streamers with minimum functions. I decided to make one that had all the functions needed. If you want to check out more of my work view my old releases here:

http://forum.sa-mp.com/index.php?topic=157771.0
http://forum.sa-mp.com/index.php?topic=158842.0

Quote from the comment:
Quote:

/**
*
* Carlton's MapIcon Streamer.
*
* @Author - Carlton
* @Copyright - 2010
* @Contact - Carltonr88@gmail.com | MSN & EMAIL
*
* Functions
* native CreateStreamedMapIcon(playerid, icon, Float: x, Float: y, Float: z, markertype, color, Float:distance);
* native RemoveStreamedMapIcon(playerid, icon);
* native MoveStreamedMapIcon(icon, Float: x, Float: y, Float: z);
* native ChangeDistanceOfStreamedMapIcon(icon, Float: distance);
* native ChangeStreamMapIconColor(icon, color);
* native ChangeStreamMapIconMarkerType(icon, markertype);
* native MapStreamer_OnPlayerConnect(playerid);
* native MapStreamer_OnPlayerDisconnect(playerid);
* native GetStreamedMapIconMarkerType(icon);
* native GetStreamedMapIconColor(icon);
* native ReloadPlayerStream(playerid);
* native CountStreamedMapIcons();
* native IsAValidStreamedMapIcon(icon);
* native DestroyAllStreamedMapIcons();
* native EnableAllStreamedMapIcons();
* native DisableAllStreamedMapIcons();
*
*/

Ok, the functions are below, each one is explained and used in a example, if you have any questions about them, please post.

pawn Код:
CreateStreamedMapIcon(playerid, icon, Float: x, Float: y, Float: z, markertype, color, Float: distance)
This creates a streamed mapicon.
pawn Код:
RemoveStreamedMapIcon(playerid, icon)
This removes a streamed mapicon.
pawn Код:
MoveStreamedMapIcon(icon, Float: x, Float: y, Float: z)
This moves a streamed mapicon to your any location needed.
pawn Код:
ChangeDistanceOfStreamedMapIcon(icon, Float: distance)
This changes the distance of a streamed map icon.
pawn Код:
ChangeStreamMapIconColor(icon, color)
This changes the color of a streamed map icon.
pawn Код:
ChangeStreamMapIconMarkerType(icon, markertype)
This changes the marker of a streamed map icon.
pawn Код:
MapStreamer_OnPlayerConnect(playerid)
This must be used if you want a player's map icon to be streamed.
pawn Код:
MapStreamer_OnPlayerDisconnect(playerid)
This shuts down the timer for a player after he/she connected
pawn Код:
GetStreamedMapIconMarkerType(icon)
Gets the mapicon's marker type
pawn Код:
GetStreamedMapIconColor(icon)
Gets the mapicon's color.
pawn Код:
ReloadPlayerStream(playerid)
Reloads the streamer for a player.
pawn Код:
CountStreamedMapIcons()
Counts the amount of streamers created.
pawn Код:
IsAValidStreamedMapIcon(icon)
Checks if the mapicon is valid.
pawn Код:
DestroyAllStreamedMapIcons()
Destroys all streamed map icons.
pawn Код:
EnableAllStreamedMapIcons()
Enables all stream map icons. ( Not suggested )
pawn Код:
DisableAllStreamedMapIcons()
Disables all stream map icons. ( Not suggested )
This is a include and a filterscript a installation is very easy to do. First download the packages below, then place MapIconStreamer.inc in Pawno > Includes folder, then put MapStreamer.pwn in your filterscripts folder, then add
pawn Код:
#include <MapIconStreamer.inc>
under a_samp include, and finally add MapStreamer at server.cfg.

Don't forget to add: MapStreamer_OnPlayerConnect and MapStreamer_OnPlayerDisConnect in the proper places. The download is below, enjoy.

Reply
#2

cool filterscript
Reply
#3

Thanks.
Reply
#4

He forced me to reply lol.
Reply
#5

Quote:
Originally Posted by oshrizzz
He forced me to reply lol.
Hmm, funny how you lied about that, like how you're lieing in your signature as if you wish you were the owner of PR-RP. I asked you to give a opinion, I didn't force you.
Reply
#6

Not bad.Might be usefull in the future(Using only 8 mapicons atm )
Reply
#7

Quote:
Originally Posted by Souvlaki
Not bad.Might be usefull in the future(Using only 8 mapicons atm )
You should use more than 8 since you're running a RP server ( Guessing by signature ). I tested the streamer with Carlito's Roleplay business system, I made the map icons show where the businesses are, about 30 or more were available. You should as a opinion, used my idea and put map icons at businesses's locations. That was just a thought for you.
Reply
#8

Quote:
Originally Posted by Carlton
Quote:
Originally Posted by Souvlaki
Not bad.Might be usefull in the future(Using only 8 mapicons atm )
You should use more than 8 since you're running a RP server ( Guessing by signature ). I tested the streamer with Carlito's Roleplay business system, I made the map icons show where the businesses are, about 30 or more were available. You should as a opinion, used my idea and put map icons at businesses's locations. That was just a thought for you.
I know I just forget do it all the time.I start doing it,I remember/Think of something cool do do then I forget doing it.But yeah this week i gotta do it
Reply
#9

How much icons supports this streamer?
Reply
#10

Quote:
Originally Posted by Martin_M
How much icons supports this streamer?
Like other streamers, infinite.

The streamer creates the mapicon, then stores the coordinates in a variable. When it's streaming it checks your position and checks if you're at the distance of the map icon you've placed. It creates it when you're at that location, when you're not it removes it. This allows infinite map icons.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)