How do I set a players color?
#1

As the title says, how Do I make it so when a player logs in, their name when they type and in TAB Will be whatever color I choose. Just for example COLOR_DARKGRAY
Reply
#2

Example:
pawn Код:
SetPlayerColor(playerid, 0x80008000);
Reply
#3

Find the part of your code where they log in. (If you're using an edited script - There's usually a message such as: "Successfully logged in!" or something along those lines, and add:

pawn Код:
SetPlayerColor(playerid, COLOR_DARKGREY);
under it.
Reply
#4

Thanks for the very fast response, where do I add that? OnPlayerSpawn, OnGameModeinit?:

EDIT: Skylar pretty much explained it, but the questions still remains, it would be OnPlayerSpawn? Using a script I created from scratch
Reply
#5

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
Thanks for the very fast response, where do I add that? OnPlayerSpawn, OnGameModeinit?:
Anywhere you want, but not under OnGameModeInit.. best option is OnPlayerSpawn.
Reply
#6

Quote:
Originally Posted by Azzeto
Посмотреть сообщение
Thanks for the very fast response, where do I add that? OnPlayerSpawn, OnGameModeinit?:

EDIT: Skylar pretty much explained it, but the questions still remains, it would be OnPlayerSpawn? Using a script I created from scratch
If you would want to make a command like /changecolour you would place SetPlayerColor(playerid, COLOR_GREEN); under that command and it would change it green. If you want everyones name to change to the same color put it under OnPlayerSpawn
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)