SA-MP Forums Archive
Need your help! (Dialogs) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need your help! (Dialogs) (/showthread.php?tid=179491)



Need your help! (Dialogs) - xploit101 - 27.09.2010

The problem is - Dialogs dsnt show up probably. It takes like 5-20 seconds to wait. can anybody help me plzz?

screen


code

pawn Код:
else if(dialogid == 6)
    {
        if(response)
        {
            new Float:oldposx, Float:oldposy, Float:oldposz;
            GetPlayerName(playerid, playername, sizeof(playername));
            GetPlayerPos(playerid, oldposx, oldposy, oldposz);
            for(new h = 0; h < sizeof(HouseInfo); h++)
            {
                if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 1 &&  HouseInfo[h][hRentabil] == 1)
                {
                    if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "   Вы уже имеете дом, /sellhouse если Вы хотите арендовать этот.");
                        return 1;
                    }
                    if(GetPlayerMoney(playerid) > HouseInfo[h][hRent])
                    {
                        PlayerInfo[playerid][pPhousekey] = h;
                        GivePlayerMoney(playerid,-HouseInfo[h][hRent]);
                        HouseInfo[h][hTakings] = HouseInfo[h][hTakings]+HouseInfo[h][hRent];
                        PlayerPlayMusic(playerid);
                        SetPlayerInterior(playerid,HouseInfo[h][hInt]);
                        SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
                        GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
                        PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
                        PlayerInfo[playerid][pLocal] = h;
                        SendClientMessage(playerid, COLOR_WHITE, "Поздравления, Вы можете войти и выйти здесь в любое время.");
                        SendClientMessage(playerid, COLOR_WHITE, "Напечатайте /help чтобы рассмотреть информацию.");
                        OnPlayerUpdate_GF(playerid);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "У Вас нет наличных денег для этого");
                        return 1;
                    }
                }
            }
        }
    }
    else if(dialogid == 7)
    {
        if(response)
        {
            new Float:oldposx, Float:oldposy, Float:oldposz;
            GetPlayerName(playerid, playername, sizeof(playername));
            GetPlayerPos(playerid, oldposx, oldposy, oldposz);
            for(new h = 0; h < sizeof(HouseInfo); h++)
            {
                if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
                {
                    if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
                    {
                        format(string, sizeof(string), "   Вы должны быть Уровнем %d, чтобы купить это !", HouseInfo[h][hLevel]);
                        SendClientMessage(playerid, COLOR_GRAD5, string);
                        return 1;
                    }
                    if(PlayerInfo[playerid][pPhousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPhousekey]][hOwner], true) == 0)
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "   Вы уже имеете дом, печатаете /sellhouse если Вы хотите купить этот !");
                        return 1;
                    }
                    if(GetPlayerMoney(playerid) > HouseInfo[h][hValue])
                    {
                        PlayerInfo[playerid][pPhousekey] = h;
                        HouseInfo[h][hOwned] = 1;
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
                        GivePlayerMoney(playerid,-HouseInfo[h][hValue]);
                        PlayerPlayMusic(playerid);
                        SetPlayerInterior(playerid,HouseInfo[h][hInt]);
                        SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
                        GameTextForPlayer(playerid, "~w~Welcome Home~n~You can exit at any time by moving to this door and typing /exit", 5000, 3);
                        PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
                        PlayerInfo[playerid][pLocal] = h;
                        SendClientMessage(playerid, COLOR_WHITE, "Поздравления, Вы можете войти и выйти здесь в любое время !");
                        SendClientMessage(playerid, COLOR_WHITE, "Напечатайте /help чтобы рассмотреть информацию !");
                        DateProp(playerid);
                        OnPropUpdate();
                        OnPlayerUpdate_GF(playerid);
                        return 1;
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "У вас не хватает денег.");
                        return 1;
                    }
                }
            }
        }
    }



Re: Need your help! (Dialogs) - Voldemort - 27.09.2010

Next time use [pawn] ..... [/pawn


I guess you have something wrong with loop


Re: Need your help! (Dialogs) - xploit101 - 27.09.2010

Quote:

Next time use [pawn] ..... [/pawn

oke

Quote:

I guess you have something wrong with loop

what is loop? can u explain plz


Re: Need your help! (Dialogs) - Voldemort - 27.09.2010

Your prob is that it shows dialog slow or that you can't buy a house? or


Re: Need your help! (Dialogs) - xploit101 - 27.09.2010

Yes it shows dialog very slow. takes about 3-10 seconds


Re: Need your help! (Dialogs) - Scenario - 27.09.2010

Maybe it's lag. If you're running this server off of your home connection, it will definitely lag.


Re: Need your help! (Dialogs) - Cameltoe - 27.09.2010

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
Maybe it's lag. If you're running this server off of your home connection, it will definitely lag.
Running off an low end computer also will cause ingame lagg.


Re: Need your help! (Dialogs) - [4k]Wang - 27.09.2010

Yes Low End computer that cant support running the feed,
you have to have a rather bad computer not be able to host.
But you need a good connection rate otherwise its just "not" going to happen.


Re: Need your help! (Dialogs) - xploit101 - 27.09.2010

its lan

anyway 2night im gonna buy a host and we'll see lagg or no


Re: Need your help! (Dialogs) - [4k]Wang - 27.09.2010

Hosts can still have lag depends on what there DEDI's are like etc.
But it wont lagg like your's.
And yeah hopfully it will be fine for you, some hosts can be bad though but nothing into the diffiency range of your old one.
Good luck.