language - message to all
#1

Hey all, i make my language switcher and i need to ask you.

SendMessage (to one player working)
Код:
stock SendMessage(playerid, color, en[], sk[])
{
    switch (GetLang(playerid))
    {
		case SK: SendClientMessage(playerid, color, sk); //
		case EN: SendClientMessage(playerid, color, en); //
    }
return true;
}
but i don't know how to make this one
Код:
stock SendMessageToAll(color, en[], sk[])
{
	loop(i, MAX_PLAYERS)
	{
            switch (GetLang(i))
            {
	          case SK: SendClientMessageToAll(i, color, sk);
	          case EN: SendClientMessageToAll(i, color, en);
            }
	}
	return true;
}
this doesn' work correct. Thanks for feedback
Reply
#2

pawn Код:
stock SendMessageToAll(color, en[], sk[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
            switch (GetLang(i))
            {        
case SK: SendClientMessage(i, color, sk);          
case EN: SendClientMessage(i, color, en);
}
}
return true;
}
try it i think it works
Reply
#3

yeah i'll try thanks
Reply
#4

ok respone after testing
Reply
#5

yyep, it works, ty
Reply
#6

no problem
your welcome
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)