Why not same color player and senddeathmessage ?
#1

Hi i have a little problem color of player are not same with color on senddeathmessage !?

Take a look :

[IMG][/IMG]
Reply
#2

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
Reply
#3

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
Reply
#4

Are you using SetPlayerColor or SetPlayerMarkerForPlayer?
Reply
#5

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
Reply
#6

Quote:
Originally Posted by DaZzY
View Post
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.
Reply
#7

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
Reply
#8

Quote:
Originally Posted by DaZzY
View Post
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.
Reply
#9

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));
}

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)