04.07.2014, 10:36
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:
Where im doing wrong?
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!");
}
}
}
}
}