Name color bug. - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Name color bug. (
/showthread.php?tid=181806)
Name color bug. -
andershh - 07.10.2010
I made a couple of commands including some SetPlayerColor(playerid, COLOR_GREEN);, but when i do the command, the name turns greenfor 1 second, then it turns white again, how can i make it stay green untill you turn it off, uses another commands wich gives you white color again?
Thanks!
Re: Name color bug. -
andershh - 07.10.2010
BUMP..........
Re: Name color bug. -
NoobScripter1 - 07.10.2010
Can you post the code? Without it i cant figure what you are doing wrong
Re: Name color bug. -
andershh - 07.10.2010
Heres the code, its some test for lspd duty.
Quote:
if(strcmp(cmd, "/dutytest", true) == 0)
{
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader] == 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerColor(playerid, COLOR_GREEN);
}
return 1;
}
|
Re: Name color bug. -
Babul - 07.10.2010
open your script, and press ctrl+f. enter "SetPlayerColor" and search/check if any of them changes a players color. comment them out, and watch the results. if the playercolor still changes, its obviously a filterscript.
Re: Name color bug. -
andershh - 07.10.2010
Theres some of them who does, like /aduty, it changes, and /amod (advisor duty) changes.
Re: Name color bug. -
[MKD]Max - 07.10.2010
you need to add on the top of script the colour you want for example
#define COLOUR_GREEN and the code for this colour its start like this 0XF00000 like this just search

i hope i helped you
Re: Name color bug. -
[MWR]Blood - 07.10.2010
Why do you need to get the player name?
Just add this:
pawn Код:
if(strcmp(cmd, "/dutytest", true) == 0)
{
if(PlayerInfo[playerid][pMember]==1||PlayerInfo[playerid][pLeader] == 1)
{
SetPlayerColor(playerid, COLOR_GREEN);
}
return 1;
}
Re: Name color bug. -
andershh - 08.10.2010
The playercolor changes, but it changes back within 1 second.