new string[128], choice[32], houseid, amount;
if(sscanf(params, "s[32]dD", choice, houseid, amount))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hedit [name] [houseid] [(Optional)amount]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Exterior, Interior, CustomInterior, CustomExterior, Level, Price");
return 1;
}
else if(strcmp(choice, "exterior", true) == 0)
{
GetPlayerPos(playerid, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]);
GetPlayerFacingAngle(playerid, HouseInfo[houseid][hExteriorA]);
SendClientMessage(playerid, COLOR_WHITE, "You have changed the exterior!");
DestroyPickup(HouseInfo[houseid][hPickupID]);
SaveHouses();
format(string, sizeof(string), "%s has edited HouseID %d's Exterior.", GetPlayerNameEx(playerid), houseid);
Log("logs/hedit.log", string);
if(HouseInfo[houseid][hOwned] ==0)
{
DestroyPickup(HouseInfo[houseid][hPickupID]);
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
format(string, sizeof(string), "This house is for sale!\n Level: %d\nID: %d\nPrice: $%d\nTo buy this house type /buyhouse",HouseInfo[houseid][hLevel],houseid,HouseInfo[houseid][hValue]);
HouseInfo[houseid][hTextID] = CreateDynamic3DTextLabel(string, COLOR_HOUSEGREEN, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]+0.5,20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
HouseInfo[houseid][hPickupID] = CreatePickup(19524, 23, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
}
else
{
if(HouseInfo[houseid][hRentable] == 0)
{
DestroyPickup(HouseInfo[houseid][hPickupID]);
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
format(string, sizeof(string), "House owner: %s\nLevel: %d\nID: %d",HouseInfo[houseid][hOwner],HouseInfo[houseid][hLevel],houseid);
HouseInfo[houseid][hTextID] = CreateDynamic3DTextLabel(string,COLOR_HOUSEGREEN,HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]+0.5,20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
HouseInfo[houseid][hPickupID] = CreatePickup(19522, 23, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
}
else
{
DestroyPickup(HouseInfo[houseid][hPickupID]);
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
format(string, sizeof(string), "House owner: %s\nLevel: %d\nID: %d\nRent: $%d\nType /rentroom to rent a room",HouseInfo[houseid][hOwner],HouseInfo[houseid][hLevel],houseid,HouseInfo[houseid][hRentFee]);
HouseInfo[houseid][hTextID] = CreateDynamic3DTextLabel(string,COLOR_HOUSEGREEN,HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]+0.5,20.0, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 0, -1, -1, -1, 10.0);
HouseInfo[houseid][hPickupID] = CreatePickup(19523, 23, HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
}
}
}
new string[128], choice[32], houseid, amount;
if(sscanf(params, "s[32]dD", choice, houseid, amount))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hedit [name] [houseid] [(Optional)amount]");
SendClientMessage(playerid, COLOR_GREY, "Available names: Exterior, Interior, CustomInterior, CustomExterior, Level, Price, StreetName");
return 1;
}
else if(strcmp(choice, "StreetName", true) == 0)
{
//Do street stuff
}
|
PHP код:
|
|
Hello!
First: You should not spam the forum with your "anyone?" or something else. When you push your thread one time per day it's enough. To your problem: Do you want to give the house a street name which is showing then in the 3D Text label? Then you should post your enum of HouseInfo. When you don't know hou you save / load the street name then you should post this code too. ![]() |
|
Look into the filterscript and search something with "enum". When you find this and it is for the house system then show us this.
And show there if you find something about the loading and saving. ![]() |
enum hInfo
{
hOwned,
hLevel,
hHInteriorWorld,
hCustomInterior,
//hDescription[8],
hOwner[MAX_PLAYER_NAME],
Float: hExteriorX,
Float: hExteriorY,
Float: hExteriorZ,
Float: hExteriorR,
Float: hExteriorA,
Float: hInteriorX,
Float: hInteriorY,
Float: hInteriorZ,
Float: hInteriorR,
Float: hInteriorA,
hLock,
hRentable,
hRentFee,
hValue,
hSafeMoney,
hPot,
hCrack,
hMaterials,
hWeapons[5],
hGLUpgrade,
hPickupID,
Text3D: hTextID,
hCustomExterior,
};
new HouseInfo[MAX_HOUSES][hInfo];