[FilterScript] Toggle minimap markers on/off.(First Filterscript)
#1

Description
So, the thing that this script does is to toggle the players' colours from white to colourful, and from colourful to white.
Which would change their visibility on the radar.
For who does not know, white colour = invisible on the radar.
The filterscript was made with ZCMD.
The filterscript uses an array full of colours to randomly pick up a color and set it up to a player when toggling the markers on.
Toggling the markers on/off only uses one command, and it's "/togglemarks" of course, it can be changed.
This is my first filterscript ever, so tell me what you think. I have never seen any filterscript that is like the one I made, so have fun with that!

Requirements
[*]ZCMD
[*]The function "ShowPlayerMarkers()" to be set to "1".

Downloads:
Pastebin
NOTE: I know it's a very simple script, but I never seen any script like that, that's why I decided to share it!
Reply
#2

The identation is killed, and sorry to say but it's a pretty useless script.
Reply
#3

Quote:
Originally Posted by willbedie
View Post
The identation is killed, and sorry to say but it's a pretty useless script.
Maybe it's not useful for public servers, but I am using it on my private server where we chase each other, and when I don't want them to see where I am- I just use the command.
Reply
#4

Quote:
Originally Posted by XpoZzA
View Post
Maybe it's not useful for public servers, but I am using it on my private server where we chase each other, and when I don't want them to see where I am- I just use the command.
Fix your identation please.
Reply
#5

Although it is something simple, it can be done in a better and more optimized way. Anyway, I congratulate you, since it is your first job and it is just beginning. You have my support to move forward. Programming is like that, you learn new things every day, nobody is born learned!
Reply
#6

Quote:
Originally Posted by Undef1ned
View Post
Although it is something simple, it can be done in a better and more optimized way. Anyway, I congratulate you, since it is your first job and it is just beginning. You have my support to move forward. Programming is like that, you learn new things every day, nobody is born learned!
Thanks!
Reply
#7

Quote:
Originally Posted by willbedie
View Post
The identation is killed, and sorry to say but it's a pretty useless script.
Quote:
Originally Posted by willbedie
View Post
Fix your identation please.
Bro i hate to see members like you on the forums who go around and criticize other people work knowingly that people are trying hard to learn coding and some just need a bit of encouragement but when they see post like this they rather to quit learning and this is why SAMP is dieing out. Regarding the indentation comment , that can be clearly classed as an correction he/she needs to make but when you call it useless because you know how to do it yourself or you don't need to use it, but others do. As Undefined said "nobody is born learned".

Quote:
Originally Posted by Undef1ned
View Post
Although it is something simple, it can be done in a better and more optimized way. Anyway, I congratulate you, since it is your first job and it is just beginning. You have my support to move forward. Programming is like that, you learn new things every day, nobody is born learned!
Facts

Quote:
Originally Posted by XpoZzA
View Post
Thanks!
Now it's a bit simple dude but atleast you are learning something and took the time out to try and make the filterscript which another new scripter can use. Also as willbedie said fix the indentations Good job
Reply
#8

Quote:
Originally Posted by XpoZzA
View Post
when I don't want them to see where I am- I just use the command.
There is no restriction, any player can use the command to toggle it for everyone on the server.

Suggestion: a player can toggle it only for themselves.

Quote:
Originally Posted by XpoZzA
View Post
For who does not know, white colour = invisible on the radar.
False. Alpha value (the last 2 characters) is what matters. 00 is invisible and FF is full opaque.

Suggestion: keep the current random color for each player and just alter the alpha of color.

A nice function can be found here: http://forum.sa-mp.com/showpost.php?...postcount=4319
It returns the new color:
pawn Code:
// visible with current color
SetPlayerMarkerVisibility(playerid, 0xFF);

// invisible with current color
SetPlayerMarkerVisibility(playerid, 0x00);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)