Spawn location problem
#1

The problem is that even if I don't own a house, it'll say "Spawn set to house"..
pawn Код:
new Hcount;
                for(new i = 0; i < MAX_HOUSES; i++)
                {
                    if(strcmp(HouseInfo[i][hOwner], PlayerInfo[playerid][Name]) == 0)
                    {
                        Hcount++;
                        SendClientMessage(playerid, SERVER, "Spawn set to house.");
                        SetSpawnInfo(playerid, PlayerInfo[playerid][Job], PlayerInfo[playerid][Skin], HouseInfo[i][hEnterX], HouseInfo[i][hEnterY], HouseInfo[i][hEnterZ], 0, 0, 0, 0, 0, 0, 0);
                        TogglePlayerSpectating(playerid, false);
                        break;
                    }
                    else continue;
                }
                if(Hcount < 1)
                {
                    SendClientMessage(playerid, RED, "You don't own a house. Searching for business..");
                    new Bcount;
                    for(new b = 0; b < MAX_BIZZ; b++)
                    {
                        if(strcmp(BusinessInfo[b][bOwner], PlayerInfo[playerid][Name]) == 0)
                        {
                            Bcount++;
                            SendClientMessage(playerid, SERVER, "Spawn set to business.");
                            SetSpawnInfo(playerid, PlayerInfo[playerid][Job], PlayerInfo[playerid][Skin], BusinessInfo[b][bEnterX], BusinessInfo[b][bEnterY], BusinessInfo[b][bEnterZ], 0, 0, 0, 0, 0, 0, 0);
                            TogglePlayerSpectating(playerid, false);
                            break;
                        }
                        else continue;
                    }
                    if(Bcount < 1)
                    {
                        SendClientMessage(playerid, RED, "You don't own a business. Spawn location set at random place.");
                        SetSpawnInfo(playerid, PlayerInfo[playerid][Job], 42, 1568.8165, -1691.8510, 5.8906, 0, 0, 0, 0, 0, 0, 0);
                        TogglePlayerSpectating(playerid, false);
                    }
                }
Reply


Messages In This Thread
Spawn location problem - by LocMax - 13.07.2014, 13:27
Re: Spawn location problem - by BlackM - 13.07.2014, 13:39
Re: Spawn location problem - by LocMax - 13.07.2014, 13:44
Re: Spawn location problem - by Konstantinos - 13.07.2014, 13:49
Re: Spawn location problem - by BlackM - 13.07.2014, 13:49
Re: Spawn location problem - by BlackM - 13.07.2014, 13:52
Re: Spawn location problem - by BlackM - 13.07.2014, 13:54
Re: Spawn location problem - by Konstantinos - 13.07.2014, 13:56
Re: Spawn location problem - by BlackM - 13.07.2014, 13:59
Re: Spawn location problem - by LocMax - 13.07.2014, 14:01

Forum Jump:


Users browsing this thread: 2 Guest(s)