Problems with an order.
#1

Hello, I have problems with my order, the following:
pawn Код:
if(strcmp(subcmd, "lumiere", true) == 0)
        {
            if(Player_infos[playerid][p_InHouse] == -1)
            {
                SendClientMessage(playerid, COLOR_ROUGE_CLAIR, "Vous devez impйrativement кtre dans une maison pour pouvoir utiliser cette commande.");
                return 1;
            }
            new h = Player_infos[playerid][p_InHouse];
            if(Maison_infos[h][h_Lumiere] == 0)
            {
                Maison_infos[h][h_Lumiere] = 1;
                Maison_update(h);
                SetPlayerChatBubble(playerid, "test.", COLOR_ACTION, 100.0, 10000);
                for(i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Player_infos[i][p_InHouse] == h)
                    {
                        TextDrawHideForPlayer(i, Player_maison_lumiere[i]);
                    }
                }
                return 1;
            }
            else
            {
                Maison_infos[h][h_Lumiere] = 0;
                Maison_update(h);
                SetPlayerChatBubble(playerid, "Une personne vient d'йteindre la lumiиre de la maison.", COLOR_ACTION, 100.0, 10000);
                for(i = 0; i < MAX_PLAYERS; i++)
                {
                    if(Player_infos[i][p_InHouse] == h)
                    {
                        TextDrawHideForPlayer(i, Player_maison_lumiere[i]);
                    }
                }
                return 1;
            }
        }
The command is: /home lumiere
I have not added the /home part, just the light part.

So when I go into a house where the state is 0 (h_Lumiere == 0), I can activate TextDraw but:
The SetPlayerChatBubble is not displayed.
Other concerns:
When I set to 0 (h_Lumiere) I can not put the house h_Lumiere 1 TextDraw and therefore does not return as at the beginning.
Thank you to those who help me
Reply
#2

Can you help me?
Reply
#3

UP plz
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)