SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/05/2020, 03:25 AM   #1
DaZzY
Little Clucker
 
Join Date: Aug 2011
Posts: 30
Reputation: 12
Question Why not same color player and senddeathmessage ?

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

Take a look :

[IMG][/IMG]
DaZzY is offline   Reply With Quote
Old 16/05/2020, 06:20 AM   #2
GameOvr
Huge Clucker
 
GameOvr's Avatar
 
Join Date: Jun 2018
Posts: 296
Reputation: 9
Default Re: Why not same color player and senddeathmessage ?

Check weather you have made it like this https://wiki.sa-mp.com/wiki/Function:SendDeathMessage

And this may happen if you are setting player's color to 0xFFFFFFFF in OnPlayerDeath
__________________
GameOvr is offline   Reply With Quote
Old 16/05/2020, 07:21 AM   #3
DaZzY
Little Clucker
 
Join Date: Aug 2011
Posts: 30
Reputation: 12
Default Re: Why not same color player and senddeathmessage ?

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
DaZzY is offline   Reply With Quote
Old 16/05/2020, 08:18 AM   #4
Proxus
Huge Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 463
Reputation: 20
Default Re: Why not same color player and senddeathmessage ?

Are you using SetPlayerColor or SetPlayerMarkerForPlayer?
__________________
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"


IMPORTANT LINKS
An upcoming mix of trucking & light roleplay
Proxus is offline   Reply With Quote
Old 16/05/2020, 08:51 AM   #5
DaZzY
Little Clucker
 
Join Date: Aug 2011
Posts: 30
Reputation: 12
Default Re: Why not same color player and senddeathmessage ?

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
DaZzY is offline   Reply With Quote
Old 16/05/2020, 08:53 AM   #6
Proxus
Huge Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 463
Reputation: 20
Default Re: Why not same color player and senddeathmessage ?

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.
__________________
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"


IMPORTANT LINKS
An upcoming mix of trucking & light roleplay
Proxus is offline   Reply With Quote
Old 16/05/2020, 08:56 AM   #7
DaZzY
Little Clucker
 
Join Date: Aug 2011
Posts: 30
Reputation: 12
Default Re: Why not same color player and senddeathmessage ?

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
DaZzY is offline   Reply With Quote
Old 16/05/2020, 09:14 AM   #8
Proxus
Huge Clucker
 
Proxus's Avatar
 
Join Date: May 2018
Location: United Kingdom
Posts: 463
Reputation: 20
Default Re: Why not same color player and senddeathmessage ?

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.
__________________
Developer @ Trucknation
"Never tell people how to do things. Tell them what to do and they will surprise you with their ingenuity"


IMPORTANT LINKS
An upcoming mix of trucking & light roleplay
Proxus is offline   Reply With Quote
Old 16/05/2020, 09:31 AM   #9
DaZzY
Little Clucker
 
Join Date: Aug 2011
Posts: 30
Reputation: 12
Default Re: Why not same color player and senddeathmessage ?

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));
}
DaZzY is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Player Name Color Mattski Scripting Help 8 05/12/2019 10:45 AM
Can't get player color? O_O Lirbo Scripting Help 2 14/04/2016 06:35 PM
Color on off player Jimmi Scripting Help 0 25/10/2015 08:39 PM
Get Player color and change vehicle color to the player color gurmani11 Scripting Help 4 03/07/2015 11:34 AM
Cannot see player color in map. Affan Scripting Help 2 04/07/2014 05:04 PM


All times are GMT. The time now is 11:25 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.