Two very basic questions - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Two very basic questions (
/showthread.php?tid=452135)
Two very basic questions -
Potmon - 20.07.2013
First how do I make people's nametags white instead of yellow?
Second how do I remove blips on the radar appearing where people are?
I'm not that much of a complete newbie at scripting but I don't know those exact functions.
Re: Two very basic questions -
SsHady - 20.07.2013
Answer to your second question
under your gamemodeinit
pawn Код:
ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);
Re: Two very basic questions -
Potmon - 20.07.2013
On the wiki it says:
Код:
ShowPlayerMarkers(0);
Re: Two very basic questions -
SsHady - 20.07.2013
both will work!!
Re: Two very basic questions -
Threshold - 20.07.2013
To set a player's name/tag colour, use
SetPlayerColor.
Example of usage:
pawn Код:
public OnPlayerSpawn(playerid) //Called when a player (re)spawns
{
SetPlayerColor(playerid, 0xFFFFFFFF); //0xFFFFFFFF is also known as white.
return 1;
}
If you do not understand colours yet, try reading this:
https://sampwiki.blast.hk/wiki/Hex_colors
If you really cannot be bothered trying to understand it, go to:
http://www.psyclops.com/tools/rgb/
then just choose/click a colour you want, and it will give you the code for it. For example, if I want red, I go to
http://www.psyclops.com/tools/rgb/, then I click on the 'Red' box from the list of colours at the bottom. If the background turns into the colour that I am looking for, then I simply go to the 'Hex String' box, and copy the Hex Code that is given to me. In this case it will be: 'FF0000'. Then I add '0x' to the front of it, and get: '0xFF0000', and I want it in solid color so I add FF to the end of it, leaving me with '0xFF0000FF'. Now I can set my player colors to Red.
pawn Код:
public OnPlayerSpawn(playerid)
{
SetPlayerColor(playerid, 0xFF0000FF); //Player is now red.
return 1;
}
As for your second, like the above poster has mentioned, you need to place the following code under OnGameModeInit. Read here:
https://sampwiki.blast.hk/wiki/ShowPlayerMarkers
Example:
pawn Код:
public OnGameModeInit()
{
ShowPlayerMarkers(PLAYER_MARKERS_MODE_OFF);
return 1;
}
A list of modes can be found here:
https://sampwiki.blast.hk/wiki/MarkerModes
Hope I've helped a bit :S