Trying to make to kick all from house
#1

Hello guys!

Im trying to make command to kick all from to house , but till now it sets every players postion to that point , even if the player not in the house...

And i tried over again and got tag mismatches:



pawn Код:
case DIALOG_HOUSE_KICK_ALL:
        {
            if(response)
            {
                for(new i;i < MAX_PLAYERS;i++)
                {
                    for(new h;h < MAX_HOUSES;h++)
                    {
                        new pName[MAX_PLAYER_NAME];
                        GetPlayerName(i, pName, sizeof(pName));
                        if(PlayerInfo[i][pInHouse] != 0 && PlayerInfo[i][pInHouse] == GetPlayerVirtualWorld(playerid)+1 && !strcmp(HouseInfo[h][hOwnerName], pName,false) == 0 || !strcmp(HouseInfo[h][hRenter], pName,false) == 0) //Tag mismatch 2 times.
                        {
                            SetPlayerPos(i, HouseInfo[h][hEnterX], HouseInfo[h][hEnterY], HouseInfo[h][hEnterZ]);
                            SetPlayerVirtualWorld(i, 0);
                            SetPlayerInterior(i,0);
                            SendClientMessage(i, COL_RED, "Jus buvote isspirta(s) is ne savo namu!");
                            SendClientMessage(playerid, COL_GREEN, "Sekmingai isspyrei visus is namu!");
                        }
                    }
                }
            }
        }
Where im doing wrong?
Reply
#2

in your house enum make sure ower and renter are like this--
hOwnerName[MAX_PLAYER_NAME],
hRenter[MAX_PLAYER_NAME
Reply
#3

yeah it is..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)