01.09.2016, 18:23
@OFF
ta editando uma GM pronta man.. mds
tu vai se enrolar mt.. ainda mais por ser inglкs
@TOPIC
substitua por esses
OBS: sei q botei mt caracteres para a string ;-; mais й a vida U.U
tenta .. tomara q de certo '-', й mt complexo esse sistema hein, me diz se funcionou ok?
ta editando uma GM pronta man.. mds
tu vai se enrolar mt.. ainda mais por ser inglкs
@TOPIC
substitua por esses
pawn Код:
enum houseData {
houseID,
houseExists,
houseOwner,
housePrice,
houseAddress[256],
Float:housePos[4],
Float:houseInt[4],
houseInterior,
houseExterior,
houseExteriorVW,
houseLocked,
houseMoney,
houseMapIcon,
Text3D:houseText3D,
housePickup,
houseLights,
houseWeapons[10],
houseAmmo[10]
pawn Код:
house_Refresh(houseid)
{
if (houseid != -1 && HouseData[houseid][houseExists])
{
if (IsValidDynamic3DTextLabel(HouseData[houseid][houseText3D]))
DestroyDynamic3DTextLabel(HouseData[houseid][houseText3D]);
if (IsValidDynamicPickup(HouseData[houseid][housePickup]))
DestroyDynamicPickup(HouseData[houseid][housePickup]);
static
string[256];
if (!HouseData[houseid][houseOwner]) {
format(string, sizeof(string), "Casa ID[%d]\n\nPreзo: %s\nEndereзo: %s", houseid, FormatNumber(HouseData[houseid][housePrice]), HouseData[houseid][houseAddress]);
HouseData[houseid][houseText3D] = CreateDynamic3DTextLabel(string, 0x96821DFF, HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
}
else {
format(string, sizeof(string), "Casa ID[%d]\n\nEndereзo: %s", houseid, HouseData[houseid][houseAddress]);
HouseData[houseid][houseText3D] = CreateDynamic3DTextLabel(string, COLOR_RAPHAEL, HouseData[houseid][housePos][0], HouseData[houseid][housePos][1], HouseData[houseid][housePos][2], 3.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, HouseData[houseid][houseExteriorVW], HouseData[houseid][houseExterior]);
}
}
return 1;
}
pawn Код:
House_Create(playerid, address[], price)
{
static
Float:x,
Float:y,
Float:z,
Float:angle;
if (GetPlayerPos(playerid, x, y, z) && GetPlayerFacingAngle(playerid, angle))
{
for (new i = 0; i != MAX_HOUSES; i ++)
{
if (!HouseData[i][houseExists])
{
HouseData[i][houseExists] = true;
HouseData[i][houseOwner] = 0;
HouseData[i][housePrice] = price;
HouseData[i][houseMoney] = 0;
format(HouseData[i][houseAddress], 256, address);
HouseData[i][housePos][0] = x;
HouseData[i][housePos][1] = y;
HouseData[i][housePos][2] = z;
HouseData[i][housePos][3] = angle;
HouseData[i][houseInt][0] = 318.6288;
HouseData[i][houseInt][1] = 1115.4702;
HouseData[i][houseInt][2] = 1084.4434;
HouseData[i][houseInt][3] = -91.0000;
HouseData[i][houseInterior] = 5;
HouseData[i][houseExterior] = GetPlayerInterior(playerid);
HouseData[i][houseExteriorVW] = GetPlayerVirtualWorld(playerid);
HouseData[i][houseLights] = false;
HouseData[i][houseLocked] = false;
House_Refresh(i);
mysql_function_query(g_iHandle, "INSERT INTO `houses` (`houseOwner`) VALUES(0)", false, "OnHouseCreated", "d", i);
return i;
}
}
}
return -1;
}
tenta .. tomara q de certo '-', й mt complexo esse sistema hein, me diz se funcionou ok?