13.02.2019, 18:46
(
Последний раз редактировалось d3Pedro; 13.02.2019 в 19:47.
)
Why are you using else if you can just use else in that case, you're checking if the house has owner already.
pawn Код:
if(!strcmp(AHouseData[HouseID][Owner], Name, false))
{
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
{
print("else called!");
}