24.05.2013, 13:53
Hi guys,i have a bug at my server,when i buy a house and is getting me in the house i'm just blocked in,i can't exit with /exit,can you help me guys with this please?
This is the code :
What's the problem?
And at houses when i buy one,the green icon just dissapear and it's sey that the house is for selling,but is mine,what is the problem here?
This is the code :
pawn Код:
if(strcmp(cmd, "/exit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
for(new i = 0; i < sizeof(HouseInfo); i++)
{
//printf("House :%d",i);
if (PlayerToPoint(3, playerid,HouseInfo[i][hExitx], HouseInfo[i][hExity], HouseInfo[i][hExitz]))
{
if(HouseEntered[playerid] == i)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[i][hEntrancex],HouseInfo[i][hEntrancey],HouseInfo[i][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
PlayerInfo[playerid][pLocal] = 255;
SetCameraBehindPlayer(playerid);
SetPlayerVirtualWorld(playerid,0);
HouseEntered[playerid] = 255;
if(HouseInfo[i][hHel] == 1)
{
new Float:tempheal;
GetPlayerHealth(playerid,tempheal);
if(tempheal < 100.0)
{
SetPlayerHealth(playerid,100.0);
}
}
return 1;
}
}
}
And at houses when i buy one,the green icon just dissapear and it's sey that the house is for selling,but is mine,what is the problem here?

