16.07.2014, 21:36
I have a list of saved houses and I want it to when a player logs in it checks the list of houses to see if he owns one. But when I run the code I have it only checks the first house on the list when there is more to be checked. Please help me.
Here is what I have: (there are no spaces in the actual coding)
please help me
Here is what I have: (there are no spaces in the actual coding)
Код:
for(new idxx=1; idxx<MAX_HOUSE; idxx++) { new name[MAX_PLAYER_NAME+1], string[24+MAX_PLAYER_NAME+1]; GetPlayerName(playerid, name, sizeof(name)); if(strcmp(HouseInfo[idxx][hOwner],name,true)!=0) //does not own { SendClientMessage(playerid, COLOR_ORANGE, "YOUR HOUSE HAS BEEN SOLD DUE TO INACTIVITY"); PlayerInfo[playerid][Houses] = 0; return 1; } else { SendClientMessage(playerid, COLOR_ORANGE, "YOUR HOUSE AUTO-SELL TIME HAS BEEN SET TO 14 DAYS FROM NOW"); ///code will soon be placed here return 1; } }