11.08.2011, 09:49
always says me the I don't near the house!
and i checked i create 2 houses and buy a one......
and i checked i create 2 houses and buy a one......
Code:
else if(!strcmp(HouseSys, "enter",true)) { new hstring[128]; GetPlayerName(playerid, playername, sizeof(playername)); for(new h = 0; h < MAX_HOUSES; h++) { if (dini_Exists(hstring)) { if(dini_Int(hstring,"Lock") == 0) { SendClientMessage(playerid, COLOR_GRAD2,hstring); if(PlayerToPoint(2.0, playerid, dini_Float(hstring,"EnterX"), dini_Float(hstring,"EnterY"), dini_Float(hstring,"EnterZ"))) { SetPlayerPos(playerid,dini_Float(hstring,"ExitX"), dini_Float(hstring,"ExitY"), dini_Float(hstring,"ExitZ")); SetPlayerInterior(playerid,dini_Int(hstring,"Int")); SetPlayerVirtualWorld(playerid,dini_Int(hstring,"World")); GameTextForPlayer(playerid, "~w~Welcome Home", 5000, 1); return 1; } } else return GameTextForPlayer(playerid, "~w~House ~r~Locked", 5000, 6); } } return SendClientMessage(playerid, COLOR_GRAD2, " You are to far from any house !"); }//enter else if(!strcmp(HouseSys, "exit",true)) { new hstring[128]; GetPlayerName(playerid, playername, sizeof(playername)); for(new h = 0; h < MAX_HOUSES; h++) { SendClientMessage(playerid, COLOR_GRAD2,hstring); if (dini_Exists(hstring)) { format(hstring, sizeof(hstring), "Houses/%d.ini", h); if(PlayerToPoint(2.0, playerid, dini_Float(hstring,"ExitX"), dini_Float(hstring,"ExitY"), dini_Float(hstring,"ExitZ"))) { SetPlayerPos(playerid,dini_Float(hstring,"EnterX"), dini_Float(hstring,"EnterY"), dini_Float(hstring,"EnterZ")); SetPlayerInterior(playerid,0); SetPlayerVirtualWorld(playerid,0); GameTextForPlayer(playerid, "~w~Have a nice day!", 5000, 1); return 1; } } } return SendClientMessage(playerid, COLOR_GRAD2, " You are to far from any house !"); }//exit