/Enter Bug
#1

I have fixed this bug before, but not quite sure how to now..it's a basic GodFather based Gamemode and you cannot /enter into businesses, houses or any other places at all. Along with exit..It worked fine before no different change in code..Here is the Code Layout..

pawn Код:
if(strcmp(cmd, "/enter", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i < sizeof(HouseInfo); i++)
            {
                if (PlayerToPoint(2.0, playerid,HouseInfo[i][hEntrancex], HouseInfo[i][hEntrancey], HouseInfo[i][hEntrancez]))
                {
                    if(HouseInfo[i][hLock] == 0 || GetPVarInt(playerid, "AdminDuty") == 1)
                    {
                        SetPlayerInterior(playerid,HouseInfo[i][hInt]);
                        SetPlayerVirtualWorld(playerid,i+100);
                        DOO_SetPlayerPos(playerid,HouseInfo[i][hExitx],HouseInfo[i][hExity],HouseInfo[i][hExitz]);
                        GameTextForPlayer(playerid, "~w~Welcome ~n~~r~Home", 5000, 1);
                        PlayerInfo[playerid][pInt] = HouseInfo[i][hInt];
                        PlayerInfo[playerid][pLocal] = i;
                        PlayerInfo2[HouseEntered][playerid] = i;
                    }
                    else
                    {
                        GameTextForPlayer(playerid, "~r~Locked", 5000, 1);
                    }
                }
            }

    if(strcmp(cmd, "/exit", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            for(new i = 0; i <  sizeof(HouseInfo); i++)
            {
                ////printf("House :%d",i);
                if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
                {
                    if(PlayerInfo2[HouseEntered][playerid] == i)
                    {
                        SetPlayerVirtualWorld(playerid,HouseInfo[i][hOutWorld]);
                        SetPlayerInterior(playerid,HouseInfo[i][hOutInt]);
                        DOO_SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
                        PlayerInfo[playerid][pInt] = 0;
                        PlayerInfo[playerid][pLocal] = 255;
                        SetCameraBehindPlayer(playerid);
                        SetPlayerVirtualWorld(playerid,0);
                        PlayerInfo2[HouseEntered][playerid] = 255;
                        if(HouseInfo[i][hHel] == 1)
                        {
                            new Float:tempheal;
                            GetPlayerHealth(playerid,tempheal);
                            if(tempheal < 100.0)
                            {
                                SetPlayerHealthEx(playerid,100.0);
                            }
                        }
                        return 1;
                    }
                }
            }
Feedback is Much Appreciated..Thanks.
Reply
#2

Script is not bug maybe your business is bug
Reply
#3

Try put it in [ pawn ][ /pawn ]
Reply
#4

There is no Business Bug, Everything worked before, I have fixed this problem before, but not quite sure what the problem is.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)