I know you said don't use strcmp but I decided to experiment before I do what you said Pottus. Here is what it outputted:
Код:
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
Else called
SetPlayerInterior(0, 10);
SetPlayerPos(0, 2260.760009, -1210.449951, 1049.020019);
Код:
if (strcmp(AHouseData[HouseID][Owner], Name, false) == 0)
{
hLevel = AHouseData[HouseID][HouseLevel];
SetPlayerVirtualWorld(playerid, 5000 + HouseID);
SetPlayerInterior(playerid, AHouseInteriors[hLevel][InteriorID]);
printf("SetPlayerInterior(%d, %d);", playerid, AHouseInteriors[hLevel][InteriorID]);
SetPlayerPos(playerid, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);
printf("SetPlayerPos(%d, %f, %f, %f);", playerid, AHouseInteriors[hLevel][IntX], AHouseInteriors[hLevel][IntY], AHouseInteriors[hLevel][IntZ]);
APlayerData[playerid][CurrentHouse] = HouseID;
SendClientMessage(playerid, COLOR_WHITE, "{FFFF00}Use {FFFF00}/housemenu{FFFF00} to change options for your house");
return 1;
}
else if (strcmp(AHouseData[HouseID][Owner], Name, false) != 0)
{
printf("Else called");
This is a bigger snippet of the code but still not all of it. Why is it printing else if so many times? The player is getting teleported to the correct position and interior, I'm just not sure what is going on. Thanks in advance.