Isto deve resolver o seu problema
.
Antes de tudo, verifique se vocк realmente estб usando a versгo do GameMode que foi postada neste tуpico
:
https://sampforum.blast.hk/showthread.php?tid=244215
Se tiver certeza que sim (pois alguns indivнduos editam Gamemodes e postam em blogs como se estivessem idкnticos бqueles dos tуpicos originais), coloque no Topo do GM
:
pawn Код:
new Text3D:CasasTexto3D[sizeof(HouseInfo)];
Depois coloque na primeira linha do
OnGameModeInit :
pawn Код:
for(new x = 0; x < 1024; x++) Delete3DTextLabel(Text3D:x);
Em seguida troque este cуdigo que estб na linha 19798
:
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)//Pickups 3D Bruno_Tadeu & Ken_xD
{
if(HouseInfo[h][hOwned] == 0)
{
format(string, sizeof(string), "Б venda, use /infocasa");
Create3DTextLabel(string, COLOR_MNC, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 50, 0);
}
if(HouseInfo[h][hOwned] == 1)
{
format(string, sizeof(string), "Dono: %s",HouseInfo[h][hOwner]);
Create3DTextLabel(string, COLOR_MNC, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 50, 0);
}
}
Por este:
pawn Код:
for(new h = 0; h < sizeof(HouseInfo); h++)//Pickups 3D Bruno_Tadeu & Ken_xD
{
if(HouseInfo[h][hOwned] == 0)
{
CasasTexto3D[h] = Create3DTextLabel("Б venda, use /infocasa", COLOR_MNC, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 50, 0);
}
if(HouseInfo[h][hOwned] == 1)
{
format(string, sizeof(string), "Dono: %s",HouseInfo[h][hOwner]);
CasasTexto3D[h] = Create3DTextLabel(string, COLOR_MNC, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 50, 0);
}
}
E por fim, troque os seus comandos de /comprarcasa e /vendercasa por estes
:
pawn Код:
if(strcmp(cmd, "/comprarcasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new Float:oldposx, Float:oldposy, Float:oldposz;
GetPlayerName(playerid, playername, sizeof(playername));
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
for(new h = 0; h < sizeof(HouseInfo); h++)
{
if(PlayerToPoint(2.0, playerid, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez]) && HouseInfo[h][hOwned] == 0)
{
if(PlayerInfo[playerid][pLevel] < HouseInfo[h][hLevel])
{
format(string, sizeof(string), " Vocк precisa ter level %d Para comprar! !", HouseInfo[h][hLevel]);
SendClientMessage(playerid, COLOR_GRAD5, string);
return 1;
}
if(PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк tem uma casa para vender digite /vendercasa ela sera vendia pelo preзo normal !");
return 1;
}
if(GetPlayerMoneyEx(playerid) > HouseInfo[h][hValue])
{
PlayerInfo[playerid][pPHousekey] = h;
HouseInfo[h][hOwned] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[h][hOwner], sendername, 0, strlen(sendername), 255);
GivePlayerMoneyEx(playerid,-HouseInfo[h][hValue]);
PlayerPlayMusic(playerid);
SetPlayerInterior(playerid,HouseInfo[h][hInt]);
SetPlayerVirtualWorld(playerid,h);
SetPlayerPos(playerid,HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz]);
GameTextForPlayer(playerid, "~w~Bem vindo em casa~n~Para sair digite /sair", 5000, 3);
PlayerInfo[playerid][pInt] = HouseInfo[h][hInt];
PlayerInfo[playerid][pLocal] = h;
Delete3DTextLabel(CasasTexto3D[h]);
format(string, sizeof(string), "Dono: %s",HouseInfo[h][hOwner]);
CasasTexto3D[h] = Create3DTextLabel(string, COLOR_MNC, HouseInfo[h][hEntrancex], HouseInfo[h][hEntrancey], HouseInfo[h][hEntrancez], 50, 0);
SendClientMessage(playerid, COLOR_WHITE, "Parabйns pela sua nova casa!");
SendClientMessage(playerid, COLOR_WHITE, "Digite /ajuda Em caso de duvidas!");
DateProp(playerid);
OnPropUpdate();
OnPlayerUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, " Vocк nгo tem dinheiro o suficiente. !");
return 1;
}
}
}
}
return 1;
}
pawn Код:
if(strcmp(cmd, "/vendercasa", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, playername, sizeof(playername));
if(PlayerInfo[playerid][pPHousekey] == 255)
{
SendClientMessage(playerid, COLOR_WHITE, "Vocк nгo tem casa.");
return 1;
}
if(PlayerInfo[playerid][pMarried] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " Vocк й casado ( a ) nгo pode vender a casa !");
return 1;
}
if(PlayerInfo[playerid][pPHousekey] != 255 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
{
new House = PlayerInfo[playerid][pPHousekey];
HouseInfo[House][hHel] = 0;
HouseInfo[House][hArm] = 0;
HouseInfo[House][hHealthx] = 0;
HouseInfo[House][hHealthy] = 0;
HouseInfo[House][hHealthz] = 0;
HouseInfo[House][hArmorrx] = 0;
HouseInfo[House][hArmorry] = 0;
HouseInfo[House][hArmorrz] = 0;
HouseInfo[House][hLock] = 1;
HouseInfo[House][hOwned] = 0;
HouseInfo[House][hVec] = 418;
HouseInfo[House][hVcol1] = -1;
HouseInfo[House][hVcol2] = -1;
GetPlayerName(playerid, sendername, sizeof(sendername));
strmid(HouseInfo[House][hOwner], "O Estado", 0, strlen("O Estado"), 255);
ConsumingMoney[playerid] = 1;
GivePlayerMoneyEx(playerid,HouseInfo[House][hValue]);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
format(string, sizeof(string), "~r~Parabens~n~ ~y~Voce vendeu sua casa por: ~n~~g~R$%d", HouseInfo[House][hValue]);
GameTextForPlayer(playerid, string, 10000, 3);
PlayerInfo[playerid][pPHousekey] = 255;
Delete3DTextLabel(CasasTexto3D[House]);
CasasTexto3D[House] = Create3DTextLabel("Б venda, use /infocasa", COLOR_MNC, HouseInfo[House][hEntrancex], HouseInfo[House][hEntrancey], HouseInfo[House][hEntrancez], 50, 0);
if(PlayerInfo[playerid][pLocal] == House)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,HouseInfo[House][hEntrancex],HouseInfo[House][hEntrancey],HouseInfo[House][hEntrancez]);
PlayerInfo[playerid][pInt] = 0;
}
OnPropUpdate();
OnPlayerUpdate(playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_WHITE, "Vocк nгo tem casa.");
}
}
return 1;
}
Espero ter ajudado
.