Question about 'stock'
#5

[quote]
Quote:
Originally Posted by leonardo1434
Посмотреть сообщение
here goes.
pawn Код:
stock SendMessage(playerid,color[],string[])
{
     if(strcmp(color,#yellow)) return SendClientMessage(playerid, COLOR_YELLOW, string);
     else if(strcmp(color,#red)) return SendClientMessage(playerid, COLOR_RED, string);
     else if(strcmp(color,#blue)) return SendClientMessage(playerid, COLOR_BLUE, string);
     return 0;
}

//usage
SendMessage(playerid,#yellow,#Fuck Yeah);
Umm, this doesnt work. I made this:
pawn Код:
SendMessage(playerid, #yellow, "YELLOW MESSAGE");
SendMessage(playerid, #red, "RED MESSAGE");
SendMessage(playerid, #blue, "BLUE MESSAGE");
and i got:
pawn Код:
YELLOW MESSAGE
RED MESSAGE
YELLOW MESSAGE
The blue message was replaced with yellow message, why?
Reply


Messages In This Thread
Question about 'stock' - by ddnbb - 12.08.2012, 12:58
Re: Question about 'stock' - by leonardo1434 - 12.08.2012, 13:18
Re: Question about 'stock' - by ddnbb - 12.08.2012, 13:23
Re: Question about 'stock' - by leonardo1434 - 12.08.2012, 13:26
Re: Question about 'stock' - by ddnbb - 12.08.2012, 13:41

Forum Jump:


Users browsing this thread: 1 Guest(s)