SA-MP Forums Archive
Problems with an order. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problems with an order. (/showthread.php?tid=468892)



Problems with an order. - FayR - 10.10.2013

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


Re : Problems with an order. - FayR - 11.10.2013

Can you help me?


Re : Problems with an order. - FayR - 11.10.2013

UP plz