languages mix
#1

hey guys


when someone rob a bank it mix with spanish and english

see

in the script:

pawn Код:
new str[128];
            new str2[128];
            GetPlayerName(playerid,str,MAX_PLAYER_NAME+1);
            format(str,sizeof(str),"[CRIME COMMITED]: %s[%d] Has Robbed From A Bank $%d. LOCATION: Los Santos, Commerce",str,playerid,money);
            SendMessageTocopteamE(str);
           
            GetPlayerName(playerid,str2,MAX_PLAYER_NAME+1);
            format(str2,sizeof(str2),"[CRIMEN COMETIDO]: %s[%d] Acaba de Robar Desde Un Banco $%d. UBICACIУN: Los Santos, Commerce",str2,playerid, money);
            SendMessageTocopteamS(str2);
SendMessageTocopteamE Function and S



pawn Код:
SendMessageTocopteamE(str[])
{
    for(new i=0;i<MAX_PLAYERS;i++)if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    {
        if(SInfo[i][Language]==1)
        {
            if(copteam[i]==1 || ciateam[i]==1 || armyteam[i]==1) SendClientMessage(i,COLOR_YELLOW,str);
        }
    }
}
SendMessageTocopteamS(str[])
{
    for(new i=0;i<MAX_PLAYERS;i++)if(IsPlayerConnected(i) && !IsPlayerNPC(i))
    {
        if(SInfo[i][Language]==2)
        {
            if(copteam[i]==1 || ciateam[i]==1 || armyteam[i]==1) SendClientMessage(i,COLOR_YELLOW,str);
        }
    }
}
what is happening in game

GoldZoro[4] Has succesfully Robbed $21547 From A Bank[4] Has succesfully Robbed $21547 From A Bank[
Reply
#2

any help? more than 12 hours passed
Reply
#3

Try using this. It's better.
Also, what are the conditions for sending the messages, i.e. the IF ELSE statements?
Reply
#4

well you help me in what's written in my post?
Reply
#5

omg man, i said i want a fix in my current help up
Reply
#6

the dudes trying to help you.
But you ignore the first helper.

So what do you want? We work for you?
We only do helpings not working for you.
Reply
#7

ok will you tell me what to do exactly?
Reply
#8

Quote:
Originally Posted by Romel
Посмотреть сообщение
the dudes trying to help you.
But you ignore the first helper.

So what do you want? We work for you?
We only do helpings not working for you.
omg man, i told them to check for me what's wrong with my code
or post me a new code
Reply
#9

Fixed one:

if(copteam[i]==1 || ciateam[i]==1 || armyteam[i]==1) SendClientMessage(i,COLOR_YELLOW,str2);

The problem was that you used SendClientMessage(playerid, color, STR); twice.

You used the same string twice.
Reply
#10

@******: he meant that str2 contains spanish version, and he used str for both cases.

@OP: Please, for your own sake use y_text

@down: My bad
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)