new Name[24]; GetPlayerName(playerid, Name, sizeof(Name)); if (AHouseData[HouseID][Owner] == Name)
array must be indexed (variable "Name")
if (AHouseData[HouseID][Owner] == Name)
if(strcmp(AHouseData[HouseID][Owner], Name) == 0)
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");
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!");
}
I'm pretty sure I changed it to else if because else provided errors and I wanted to see if anything changed. Any other things?
|
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);
SetPlayerVirtualWorld(0, 5828); SetPlayerInterior(0, 0); SetPlayerPos(0, 0.000000, 0.000000, 0.000000);