SA-MP Forums Archive
Trying to make to kick all from house - 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: Trying to make to kick all from house (/showthread.php?tid=523861)



Trying to make to kick all from house - Dziugsas - 04.07.2014

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?


Re: Trying to make to kick all from house - BroZeus - 04.07.2014

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


Re: Trying to make to kick all from house - Dziugsas - 04.07.2014

yeah it is..