14.03.2010, 14:25
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:
Ok, the functions are below, each one is explained and used in a example, if you have any questions about them, please post.
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
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.
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(); * */ |
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 )
pawn Код:
#include <MapIconStreamer.inc>
Don't forget to add: MapStreamer_OnPlayerConnect and MapStreamer_OnPlayerDisConnect in the proper places. The download is below, enjoy.