Toggle minimap markers on/off.(First Filterscript) -
XpoZzA - 28.09.2018
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!
Re: Toggle minimap markers on/off.(First Filterscript) -
solstice_ - 28.09.2018
The identation is killed, and sorry to say but it's a pretty useless script.
Re: Toggle minimap markers on/off.(First Filterscript) -
XpoZzA - 28.09.2018
Quote:
Originally Posted by willbedie
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.
Re: Toggle minimap markers on/off.(First Filterscript) -
solstice_ - 28.09.2018
Quote:
Originally Posted by XpoZzA
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.
Re: Toggle minimap markers on/off.(First Filterscript) -
Undef1ned - 28.09.2018
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!
Re: Toggle minimap markers on/off.(First Filterscript) -
XpoZzA - 29.09.2018
Quote:
Originally Posted by Undef1ned
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!
Re: Toggle minimap markers on/off.(First Filterscript) -
Leaky - 07.10.2018
Quote:
Originally Posted by willbedie
The identation is killed, and sorry to say but it's a pretty useless script.
|
Quote:
Originally Posted by willbedie
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
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
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
Re: Toggle minimap markers on/off.(First Filterscript) -
Calisthenics - 07.10.2018
Quote:
Originally Posted by XpoZzA
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
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);