25.09.2011, 14:45
So here is the whole team that it's wrong?
Even in the game does not show the L
PHP Code:
if(dialogid == 22)
{
if(response)
{
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new home = 1; home < MAX_HOUSE; home++)
{
if (PlayerToPoint(2, playerid,HouseInfo[home][hEnterX],HouseInfo[home][hEnterY],HouseInfo[home][hEnterZ]))
{
if(GetPVarInt(playerid,"House") != 0)
{
SendClientMessage(playerid, COLOR_WHITE, " У вас уже есть дом, продайте его через меню >> дома >> продать");
return 1;
}
if(GetPlayerMoney(playerid) > HouseInfo[home][hPrice])
{
new plname[MAX_PLAYER_NAME],sql[256],string[256];
GetPlayerName(playerid,plname,sizeof(plname));
GivePlayerMoney(playerid,-HouseInfo[home][hPrice]);
SetPVarInt(playerid,"House",home);
SetPVarInt(playerid,"Int",HouseInfo[home][hInt]);
SetPVarInt(playerid,"Local",HouseInfo[home][hInt]);
SendClientMessage(playerid, COLOR_WHITE, "Поздравляем, с покупкой дома !");
SendClientMessage(playerid, COLOR_WHITE, "Используйте /help чтобы посмотреть команды для дома !");
SendClientMessage(playerid, COLOR_WHITE, "Используйте C(кнопка присесть) что бы войти в дом !");
HouseInfo[home][hId] = home; // для цифр
HouseInfo[home][hEnterX] = x;
HouseInfo[home][hEnterY] = y;
HouseInfo[home][hEnterZ] = z;
HouseInfo[home][hExitX] = 2350.33984;
HouseInfo[home][hExitY] = -1181.64990;
HouseInfo[home][hExitZ] = 1027.97656;
HouseInfo[home][hOwned] = 1;
strmid(HouseInfo[home][hOwner], plname, 0, sizeof(plname)*4, sizeof(plname)*4);
HouseInfo[home][hInt] = 5;
HouseInfo[home][hPrice] = HouseInfo[home][hPrice];
format(sql, 256, "UPDATE `"HouseTable"` SET EnterX='%f',EnterY='%f',EnterZ='%f',ExitX='%f',ExitY='%f',ExitZ='%f',Owner='%s',Owned='%d',Price='%d',Inter='%d' WHERE id=%d",
HouseInfo[home][hEnterX],
HouseInfo[home][hEnterY],
HouseInfo[home][hEnterZ],
HouseInfo[home][hExitX],
HouseInfo[home][hExitY],
HouseInfo[home][hExitZ],
HouseInfo[home][hOwner],
plname,
HouseInfo[home][hPrice],
HouseInfo[home][hInt],
home );
mysql_query(sql);
MySQL_Player_Update(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " У вас нет столько денег !");
return 1;
}
}
}
}
else
{
return 1;
}
}