new Text3D:CasasTexto3D[sizeof(HouseInfo)];
for(new x = 0; x < 1024; x++) Delete3DTextLabel(Text3D:x);
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);
}
}
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);
}
}
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;
}
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;
}
eu troquei tudo 100% serto mais deu 1 erro
C:\Users\Felipe Matheus\Desktop\PerfectLifeCASA.pwn(13) : error 017: undefined symbol "HouseInfo" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
enum hInfo
{
Float:hEntrancex,
Float:hEntrancey,
Float:hEntrancez,
Float:hExitx,
Float:hExity,
Float:hExitz,
hHealthx,
hHealthy,
hHealthz,
hArmourx,
hArmoury,
hArmourz,
hOwner[MAX_PLAYER_NAME],
hDiscription[MAX_PLAYER_NAME],
hValue,
hHel,
hArm,
hInt,
hLock,
hOwned,
hRooms,
hRent,
hRentabil,
hTakings,
hVec,
hVcol1,
hVcol2,
hDate,
hLevel,
hWorld,
};
new HouseInfo[210][hInfo];
new HouseInfo[MAXIMO_CASAS][hInfo];
new Text3D:CasasTexto3D[sizeof(HouseInfo)];