View Full Version : GetPlayerColor not working as intended.

01/10/2016, 02:11 PM
if(GetPlayerMoney(playerid >= 500))
if(GetPlayerColor(playerid == 0xFFFFFF00))
return SendClientMessage(playerid, -1, "[System]: Your name tag color is already White. You don't need to change it.");
SetPlayerColor(playerid, 0xFFFFFF00);
GivePlayerMoney(playerid, -500);
SendClientMessage(playerid, -1, "[System]: You have changed your name tag color to White (-$500). Thank you for your purchase!");

When i buy a color it says your color is already white. Does not set my color to white, and does this while my color is orange.

And the logic seems fine to me, maybe this has something to do with the GetPlayerColor usage?

01/10/2016, 02:15 PM
You have a coding mistake right there, this:

if(GetPlayerColor(playerid == 0xFFFFFF00))

Should be:

if(GetPlayerColor(playerid) == 0xFFFFFF00 )

01/10/2016, 02:20 PM
What i did was to check the playerid instead of color right?

I am so stupid goddamit.