Name color bug.
#1

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!
Reply
#2

BUMP..........
Reply
#3

Can you post the code? Without it i cant figure what you are doing wrong
Reply
#4

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

Reply
#5

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

Theres some of them who does, like /aduty, it changes, and /amod (advisor duty) changes.
Reply
#7

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

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;
}
Reply
#9

The playercolor changes, but it changes back within 1 second.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)