GetPlayerColor not working as intended.
#1

Код:
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?
Reply
#2

You have a coding mistake right there, this:

PHP код:
if(GetPlayerColor(playerid == 0xFFFFFF00)) 
Should be:
PHP код:
if(GetPlayerColor(playerid) == 0xFFFFFF00 
Reply
#3

What i did was to check the playerid instead of color right?

I am so stupid goddamit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)