Why not same color player and senddeathmessage ? - 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: Why not same color player and senddeathmessage ? (
/showthread.php?tid=675575)
Why not same color player and senddeathmessage ? -
DaZzY - 16.05.2020
Hi i have a little problem color of player are not same with color on senddeathmessage !?
Take a look :
[IMG]

[/IMG]
Re: Why not same color player and senddeathmessage ? -
GameOvr - 16.05.2020
Check weather you have made it like this
https://sampwiki.blast.hk/wiki/Function:SendDeathMessage
And this may happen if you are setting player's color to 0xFFFFFFFF in OnPlayerDeath
Re: Why not same color player and senddeathmessage ? -
DaZzY - 16.05.2020
yes i have made it like on wiki and i dont add a color when player death i dont have any idea why color is white on senddeathmessage
Re: Why not same color player and senddeathmessage ? -
Proxus - 16.05.2020
Are you using SetPlayerColor or SetPlayerMarkerForPlayer?
Re: Why not same color player and senddeathmessage ? -
DaZzY - 16.05.2020
Yes im using this for a command this command make player invisible on map but when player is invisible on map there is no problem with senddeathmessage there is a color of player on it
Re: Why not same color player and senddeathmessage ? -
Proxus - 16.05.2020
Quote:
Originally Posted by DaZzY
Yes im using this for a command this command make player invisible on map but when player is invisible on map there is no problem with senddeathmessage there is a color of player on it
|
Then you're not setting the colour elsewhere, only after they turn invisible.
Re: Why not same color player and senddeathmessage ? -
DaZzY - 16.05.2020
this is apart of cmd to make player invisible
Quote:
for (new i; i < MAX_PLAYERS; i++) {
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
|
i need to add else ? and how to reset player color
Re: Why not same color player and senddeathmessage ? -
Proxus - 16.05.2020
Quote:
Originally Posted by DaZzY
this is apart of cmd to make player invisible
i need to add else ? and how to reset player color
|
That's not what I said. You're telling me that you're only setting the colour when the player goes invisible. You need to set it elsewhere. I have no idea how your script works, but you can set colours for different teams/classes if that's what works best for your gamemode. Otherwise, you can set a random colour when the player joins, etc.
Re: Why not same color player and senddeathmessage ? -
DaZzY - 16.05.2020
Yes sorry for my English
i fix it
i changed
Quote:
SetPlayerMarkerForPlayer(i, playerid, (g_Team[g_Player[playerid][playerClass]][teamColor] | 0xFFFFFFFF));
|
To
Quote:
SetPlayerMarkerForPlayer(i, playerid, (g_Team[g_Player[playerid][playerClass]][teamColor] ));
|
this is on onplayerspawn
but when player use cmd to be invisible that work now ?
i have this code on cmd
Quote:
for (new i; i < MAX_PLAYERS; i++) {
SetPlayerMarkerForPlayer(i, playerid, (GetPlayerColor(playerid) & 0xFFFFFF00));
}
|