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