Adding street name
#1

Hello, I would like to add an option if you change the exterior to add a street name how can I add here:

PHP код:
new string[128], choice[32], houseidamount;
    if(
sscanf(params"s[32]dD"choicehouseidamount))
    {
        
SendClientMessage(playeridCOLOR_WHITE"USAGE: /hedit [name] [houseid] [(Optional)amount]");
        
SendClientMessage(playeridCOLOR_GREY"Available names: Exterior, Interior, CustomInterior, CustomExterior, Level, Price");
        return 
1;
    } 
That I'm able to add a street name only by "exterior" ?

See option exterior:

PHP код:
else if(strcmp(choice"exterior"true) == 0)
    {
        
GetPlayerPos(playeridHouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]);
        
GetPlayerFacingAngle(playeridHouseInfo[houseid][hExteriorA]);
        
SendClientMessage(playeridCOLOR_WHITE"You have changed the exterior!");
        
DestroyPickup(HouseInfo[houseid][hPickupID]);
        
SaveHouses();
        
format(stringsizeof(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(stringsizeof(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(stringCOLOR_HOUSEGREENHouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ]+0.5,20.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1, -110.0);
            
HouseInfo[houseid][hPickupID] = CreatePickup(1952423HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
        }
        else
        {
            if(
HouseInfo[houseid][hRentable] == 0)
            {
                
DestroyPickup(HouseInfo[houseid][hPickupID]);
                
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
                
format(stringsizeof(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.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1, -110.0);
                
HouseInfo[houseid][hPickupID] = CreatePickup(1952223HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
            }
            else
            {
                
DestroyPickup(HouseInfo[houseid][hPickupID]);
                
DestroyDynamic3DTextLabel(HouseInfo[houseid][hTextID]);
                
format(stringsizeof(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.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1, -110.0);
                
HouseInfo[houseid][hPickupID] = CreatePickup(1952323HouseInfo[houseid][hExteriorX], HouseInfo[houseid][hExteriorY], HouseInfo[houseid][hExteriorZ], -1);
            }
        }
    } 
Also, how can I make a new option to only edit the street name ?
Reply
#2

anyone ?
Reply
#3

bump
Reply
#4

PHP код:
new string[128], choice[32], houseidamount;
if(
sscanf(params"s[32]dD"choicehouseidamount))
{
    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /hedit [name] [houseid] [(Optional)amount]");
    
SendClientMessage(playeridCOLOR_GREY"Available names: Exterior, Interior, CustomInterior, CustomExterior, Level, Price, StreetName");
    return 
1;
}
else if(
strcmp(choice"StreetName"true) == 0)
{
     
//Do street stuff

Reply
#5

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
PHP код:
new string[128], choice[32], houseidamount;
if(
sscanf(params"s[32]dD"choicehouseidamount))
{
    
SendClientMessage(playeridCOLOR_WHITE"USAGE: /hedit [name] [houseid] [(Optional)amount]");
    
SendClientMessage(playeridCOLOR_GREY"Available names: Exterior, Interior, CustomInterior, CustomExterior, Level, Price, StreetName");
    return 
1;
}
else if(
strcmp(choice"StreetName"true) == 0)
{
     
//Do street stuff

I dont have any street stuff thats kinda the problem..

anyone ?

Is there anyone who can help me with this ? I'm currently stuck..
Reply
#6

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.
Reply
#7

Quote:
Originally Posted by Mencent
Посмотреть сообщение
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.
I know sorry, How can I define this I have downloaded a few house filterscripts and I can't find anything how I can define it
Reply
#8

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.
Reply
#9

Quote:
Originally Posted by Mencent
Посмотреть сообщение
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.
Okay, I need to know where I need to define the street names I know I can define "HAddress" enum


PHP код:
enum hInfo
{
    
hOwned,
    
hLevel,
    
hHInteriorWorld,
    
hCustomInterior,
    
//hDescription[8],
    
hOwner[MAX_PLAYER_NAME],
    
FloathExteriorX,
    
FloathExteriorY,
    
FloathExteriorZ,
    
FloathExteriorR,
    
FloathExteriorA,
    
FloathInteriorX,
    
FloathInteriorY,
    
FloathInteriorZ,
    
FloathInteriorR,
    
FloathInteriorA,
    
hLock,
    
hRentable,
    
hRentFee,
    
hValue,
    
hSafeMoney,
    
hPot,
    
hCrack,
    
hMaterials,
    
hWeapons[5],
    
hGLUpgrade,
    
hPickupID,
    
Text3DhTextID,
    
hCustomExterior,
};
new 
HouseInfo[MAX_HOUSES][hInfo]; 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)