Help foreach :|
#1

Hello guys, so i was compiling JaKe's House system and got this:

PHP код:
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 017undefined symbol "foreach"
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 029invalid expressionassumed zero
C
:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 017undefined symbol "i"
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : fatal error 107too many error messages on one line 
i know you would say, Now i'm sure that all your releases are copied...
And i would say that no u r wrong, because i got foreach.inc in Pawno>include>foreach.inc and ain't accepting it help..
Reply
#2

Did you even did "#include <foreach>" ?. I'm asking cuz u didnt mentioned that in the post
Reply
#3

Quote:
Originally Posted by RyderX
Посмотреть сообщение
Hello guys, so i was compiling JaKe's House system and got this:

PHP код:
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 017undefined symbol "foreach"
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 029invalid expressionassumed zero
C
:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : error 017undefined symbol "i"
C:\Users\Admin\Desktop\[GameMode]World Stunt Freeroam v0.5\filterscripts\House.pwn(910) : fatal error 107too many error messages on one line 
i know you would say, Now i'm sure that all your releases are copied...
And i would say that no u r wrong, because i got foreach.inc in Pawno>include>foreach.inc and ain't accepting it help..
use YSI (y_iterate) better than foreach

also change
PHP код:
foreach (ix
to

PHP код:
foreach (new iPlayer
Reply
#4

Quote:
Originally Posted by Yaa
Посмотреть сообщение
use YSI (y_iterate) better than foreach
They are the same lol, I actually prefer foreach more than y_iterator.
I don't even like the YSI includes.
Reply
#5

The foreach you're using may not be matched with the filterscript. There are two types of foreach - standalone version and the one that comes along with YSI package.
Reply
#6

So, how the hell you created an freeroam gamemode without any Knowledges about basic things ?
Reply
#7

Ye i already added foreach include.

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
So, how the hell you created an freeroam gamemode without any Knowledges about basic things ?
pls bro stop being rude u can read my whole post ALREADY SAID DONT SAY THAT "NOW I CAN SAY DAT ALL UR RELEASES IS COPIED"
Because i didnt got any errotr like this before!
So please if u something useful to write and might help me post it and if u dont so stop posting useless reply.
Reply
#8

Ryder show me code :P
Reply
#9

PHP код:
//
// JakHouse (Jake's House System) v1.0
// Simple, Efficient, and Easy to use!
// Housing System, You can also add your own custom interior.
// Refer to SA-MP forums for more information regarding to JakHouse.
// Credits: DracoBlue, Jake, Zeex, Incognito, ******
//

//Changelog for JakHouse: None

//
//============================================================================//
// Includes

#include             <a_samp> //SAMP Team
#include            <zcmd> //Zeex
#include            <streamer> //Incognito
#include            <sscanf2> //******
#include            <dini> //DracoBlue
#include            <foreach> //******

//
//============================================================================//
// File Path

#define             HOUSE_PATH                  "JakHouse/Houses/house_%d.ini"
#define             USER_PATH                   "JakHouse/User/%s.ini"

//
//============================================================================//
// Configuartions

#define             MAX_HOUSE_NAME              256
#define             MAX_HOUSES                  350

#define             FREEZE_LOAD                 true
//If enable, Freezes you once entered the house, freezes you aswell once exited the house
//The freeze lifts off in 5 seconds, depends on FREEZE_TIME

#define             FREEZE_TIME                 5   //In seconds

#define             FORCE_SPAWNHOME             true
//Once the FORCE_SPAWNHOME is set to true, a timer will be run for 2.5 seconds when you spawn.
//Once that timer is called, Player will be forced spawn in his home if he has the spawn settings on.
//This define is created as the spawnhome feature we had doesn't work, as instead of spawning at home, it spawns at the gamemode's spawnpoint.

//You can change this [Just make sure you know what you are doing].

#define             SALE_PICKUP                 1273
#define             NOTSALE_PICKUP              1272
#define             NOTSALE_ICON                 32
#define             SALE_ICON                    31

#define             STREAM_DISTANCES            35.0
//Do not make it higher, or else it will conflict with the other stream objects etc.

//
//============================================================================//
// Colors

#define              white                          "{FFFFFF}"
#define              red                            "{FF0000}"
#define              green                          "{33CC33}"
#define             yellow                      "{FFFF00}"

#define             COLOR_RED                      0xFF0000C8
#define             COLOR_YELLOW                 0xFFFF00AA
#define             COLOR_GREEN                 0x33CC33C8
#define             COLOR_WHITE                 0xFFFFFFFF

//
//============================================================================//
// Dialogs

#define             DIALOG_HMENU                6000
#define             DIALOG_NULL                 DIALOG_HMENU-1
#define             DIALOG_HNAME                DIALOG_HMENU+1
#define             DIALOG_HPRICE               DIALOG_HMENU+2
#define             DIALOG_HSTOREC              DIALOG_HMENU+3
#define             DIALOG_WCASH                DIALOG_HMENU+4
#define             DIALOG_HSTORE               DIALOG_HMENU+5
#define             DIALOG_HWORLD               DIALOG_HMENU+6
#define             DIALOG_HINTERIOR            DIALOG_HMENU+7
#define             DIALOG_HSPAWN               DIALOG_HMENU+8
//Making the dialog id changing easier by just adding it.

//
//============================================================================//
// Enums

enum HouseInfo
{
    
hName[MAX_HOUSE_NAME],
    
hOwner[256],
    
hIName[256],
    
hPrice,
    
hSale,
    
hInterior,
    
hWorld,
    
hLocked,
    
Float:hEnterPos[4],
    
Float:hPickupP[3],
    
Float:ExitCPPos[3],
    
hMapIcon,
    
hPickup,
    
hCP,
    
hLevel,
    
Text3D:hLabel,
    
MoneyStore,
    
hNotes[256]
};

enum InteriorInfo
{
    
Name[128],
    
Float:SpawnPointX,
    
Float:SpawnPointY,
    
Float:SpawnPointZ,
    
Float:SpawnPointA,
    
Float:ExitPointX,
    
Float:ExitPointY,
    
Float:ExitPointZ,
    
i_Int,
    
i_Price,
    
Notes[128]
};

enum HousePInfo
{
    
OwnedHouses,
    
Float:p_SpawnPoint[4],
    
p_Interior,
    
p_Spawn
};

//
//============================================================================//
// Arrays, Variables.

//Interior Lists
new intInfo[][InteriorInfo] =
{
    {
"Unused House"2324.3469, -1145.88121050.7101359.63992324.4570, -1148.80441050.7101121500000"No bugs/glitches found"},
    {
"House #1"235.30691190.04911080.2578359.9533235.39691187.69351080.257831000000"No bugs/glitches found"},
    {
"House #2"222.98371239.83911082.140692.7009225.88771240.02091082.140621000000"No bugs/glitches found"},
    {
"House #3"223.33131290.39791082.13280.2667223.34521287.80871082.14061950000"No bugs/glitches found"},
    {
"House #4"225.79101025.77431084.00780.2900225.63101022.48001084.014672950000"No bugs/glitches found"},
    {
"House #5"295.19221475.53531080.25783.4232295.28541473.01171080.257815980000"No bugs/glitches found"},
    {
"House #6"2265.8953, -1210.49261049.023488.75212269.4565, -1210.45971047.5625101000000"No bugs/glitches found"},
    {
"Ryder's House"2463.5032, -1698.18811013.507889.83372466.9146, -1698.28421013.507823000000"Some floors of the interior are bugged."},
    {
"Sweet's House"2530.1094, -1679.27721015.4986359.63952525.2393, -1679.36991015.498613500000"Some floors/walls of the interior are bugged."},
    {
"Crack Den"317.93711118.06951083.88281.3314318.56471115.59231083.882853200000"No bugs/glitches found"},
    {
"Carl Johnson's House"2496.0076, -1695.89281014.7422181.18642495.9934, -1692.97421014.742234500000"No bugs/glitches found"},
    {
"Maddog's Crib (HUGE)"1298.9324, -793.38311084.00780.41471298.9706, -795.96891084.007855500000"No bugs/glitches found"},
    {
"Santa Maria Beach House"2365.0667, -1131.36451050.87500.10142365.3577, -1134.28911050.875081200000"No bugs/glitches found"}
    
//{House Name[], Float:sX, Float:sY, Float:sZ, Float:sA, Float:eX, Float:eY, Float:eZ, interior, price, notes[]}
};

new 
hInfo[MAX_HOUSES][HouseInfo];
new 
jpInfo[MAX_PLAYERS][HousePInfo];

new 
h_Loaded 0;
new 
h_ID[MAX_PLAYERS];
new 
h_Inside[MAX_PLAYERS];
new 
h_Selection[MAX_PLAYERS];
new 
h_Selected[MAX_PLAYERS];

//
//============================================================================//
// Public functions and others.

public OnFilterScriptInit()
{
    for(new 
i=0i<MAX_HOUSESi++)
    {
        if(
fexist(HousePath(i)))
        {
            
LoadHouse(i);
            
h_Loaded ++;
        }
    }

    
printf("... Houses loaded by JakHouse [%d houses out of %d]"h_LoadedMAX_HOUSES);
    return 
1;
}

public 
OnFilterScriptExit()
{
    for(new 
a=0a<MAX_HOUSESa++)
    {
        
DestroyDynamicCP(hInfo[a][hCP]);
        
DestroyDynamicPickup(hInfo[a][hPickup]);
        
DestroyDynamicMapIcon(hInfo[a][hMapIcon]);
        
DestroyDynamic3DTextLabel(hInfo[a][hLabel]);
    }
    return 
1;
}


public 
OnPlayerConnect(playerid)
{
    
h_ID[playerid] = -1;
    
h_Inside[playerid] = -1;
    
h_Selection[playerid] = 0;
    
h_Selected[playerid] = -1;

    if(!
fexist(PlayerPath(playerid)))
    {
        
jpInfo[playerid][OwnedHouses] = 0;
        
jpInfo[playerid][p_SpawnPoint][0] = 0.0;
        
jpInfo[playerid][p_SpawnPoint][1] = 0.0;
        
jpInfo[playerid][p_SpawnPoint][2] = 0.0;
        
jpInfo[playerid][p_SpawnPoint][3] = 0.0;
        
jpInfo[playerid][p_Interior] = 0;
        
jpInfo[playerid][p_Spawn] = 0;

        
dini_Create(PlayerPath(playerid));

        
Player_Save(playerid);
        
Player_Load(playerid);
    }
    else
    {
        
Player_Load(playerid);
    }
    return 
1;
}

public 
OnPlayerDisconnect(playeridreason)
{
    
h_ID[playerid] = -1;
    
h_Inside[playerid] = -1;
    
h_Selection[playerid] = 0;
    
h_Selected[playerid] = -1;

    if(
fexist(PlayerPath(playerid))) Player_Save(playerid);
    return 
1;
}

public 
OnPlayerSpawn(playerid)
{
    if(
jpInfo[playerid][p_Spawn] == 1)
    {
        
#if FREEZE_LOAD == true
            
House_Load(playerid);
        
#endif

        
SendClientMessage(playeridCOLOR_GREEN"<!> Spawned at your house.");

        
#if FORCE_SPAWNHOME == true
        
SetTimerEx("JakSpawnHome"2500false"d"playerid);
        
SendClientMessage(playerid, -1"Force respawning to your house...");
        
#else
        
SetPlayerInterior(playeridjpInfo[playerid][p_Interior]);
        
SetPlayerPos(playeridjpInfo[playerid][p_SpawnPoint][0], jpInfo[playerid][p_SpawnPoint][1], jpInfo[playerid][p_SpawnPoint][2]);
        
SetPlayerFacingAngle(playeridjpInfo[playerid][p_SpawnPoint][3]);
        
#endif
    
}
    return 
1;
}

forward JakSpawnHome(playerid);
public 
JakSpawnHome(playerid)
{
    
SetPlayerInterior(playeridjpInfo[playerid][p_Interior]);
    
SetPlayerPos(playeridjpInfo[playerid][p_SpawnPoint][0], jpInfo[playerid][p_SpawnPoint][1], jpInfo[playerid][p_SpawnPoint][2]);
    
SetPlayerFacingAngle(playeridjpInfo[playerid][p_SpawnPoint][3]);
    return 
SendClientMessage(playeridCOLOR_YELLOW"<!> Finally spawned at your house.");
}

public 
OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    for(new 
x=0x<MAX_HOUSESx++)
    {
        if(
checkpointid == hInfo[x][hCP])
        {
            
#if FREEZE_LOAD == true
                
House_Load(playerid);

                
SetPlayerPos(playeridhInfo[x][hPickupP][0], hInfo[x][hPickupP][1], hInfo[x][hPickupP][2]);
                
SetPlayerInterior(playerid0);
                
SetPlayerVirtualWorld(playerid0);

            
#else
                
SetPlayerPos(playeridhInfo[x][hPickupP][0], hInfo[x][hPickupP][1], hInfo[x][hPickupP][2]);
                
SetPlayerInterior(playerid0);
                
SetPlayerVirtualWorld(playerid0);

            
#endif

            
h_Inside[playerid] = -1;
        }
    }
    return 
1;
}

public 
OnPlayerPickUpDynamicPickup(playeridpickupid)
{
    for(new 
x=0x<MAX_HOUSESx++)
    {
        if(
pickupid == hInfo[x][hPickup])
        {
            
h_ID[playerid] = x;
         }
    }
    return 
1;
}

public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
hid h_ID[playerid];

    if(
dialogid == DIALOG_HMENU)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
ShowPlayerDialog(playeridDIALOG_HNAMEDIALOG_STYLE_INPUT""green"House Name",\
                    
""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100""Configure""Back");
                }
                case 
1:
                {
                    
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                    
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)""Configure""Back");
                }
                case 
2:
                {
                    
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                    
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)""Configure""Back");
                }
                case 
3:
                {
                    
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                    
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)""Configure""Back");
                }
                case 
4:
                {
                    new 
string[1000];
                    
format(stringsizeof(string), ""white"Your house safe status:\n\nCash Stored: "green"$%d\n"white"Notes:\n"red"%s"hInfo[hid][MoneyStore], hInfo[hid][hNotes]);
                    
ShowPlayerDialog(playeridDIALOG_HSTOREDIALOG_STYLE_MSGBOX""green"Storage Info",\
                    
string"Back""");
                }
                case 
5:
                {
                    
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                    
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)""Configure""Back");
                }
                case 
6:
                {
                    new 
string[1200];

                    for(new 
a=0a<sizeof(intInfo); a++)
                    {
                        
format(stringsizeof(string), "%s%s - $%d\n"stringintInfo[a][Name], intInfo[a][i_Price]);
                    }
                    
ShowPlayerDialog(playeridDIALOG_HINTERIORDIALOG_STYLE_LIST""green"Interior"string"Preview""Back");
                }
                case 
7:
                {
                    if(
jpInfo[playerid][p_Spawn] == 0)
                    {
                        
ShowPlayerDialog(playeridDIALOG_HSPAWNDIALOG_STYLE_MSGBOX""yellow"Spawn at Home, Are you sure?",\
                        
""white"Are you sure you want to spawn at your house everytime you die?""Yes""No");
                    }
                    else
                    {
                        
ShowPlayerDialog(playeridDIALOG_HSPAWNDIALOG_STYLE_MSGBOX""yellow"Are you sure?",\
                        
""white"Are you sure you will no longer spawn at your house everytime you die?""Yes""No");
                    }
                }
            }
        }
    }
    if(
dialogid == DIALOG_HSPAWN)
    {
        if(
response)
        {
            if(
jpInfo[playerid][p_Spawn] == 0)
            {
                
jpInfo[playerid][p_Spawn] = 1;
                
SendClientMessage(playerid, -1"<!> You will now spawn at your house, everytime you die.");
            }
            else if(
jpInfo[playerid][p_Spawn] == 1)
            {
                
jpInfo[playerid][p_Spawn] = 0;
                
SendClientMessage(playerid, -1"<!> You will no longer spawn at your house, everytime you die.");
            }
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HINTERIOR)
    {
        if(
response)
        {
            new 
hi listitem;
            
h_Selected[playerid] = hi;

            
TogglePlayerControllable(playerid0);
            
SetCameraBehindPlayer(playerid);

            
h_Selection[playerid] = 1;

            new 
Float:x_Pos[3];
            
GetPlayerPos(playeridx_Pos[0], x_Pos[1], x_Pos[2]);
            
SetPVarInt(playerid"h_Interior"GetPlayerInterior(playerid));
            
SetPVarInt(playerid"h_World"GetPlayerVirtualWorld(playerid));
            
SetPVarFloat(playerid"h_X"x_Pos[0]);
            
SetPVarFloat(playerid"h_Y"x_Pos[1]);
            
SetPVarFloat(playerid"h_Z"x_Pos[2]);

            
SetPlayerPos(playeridintInfo[hi][SpawnPointX], intInfo[hi][SpawnPointY], intInfo[hi][SpawnPointZ]);
            
SetPlayerInterior(playeridintInfo[hi][i_Int]);
            
SetPlayerFacingAngle(playeridintInfo[hi][SpawnPointA]);
            
SetPlayerVirtualWorld(playerid271569); //So in that way, no one can see you during the preview.

            
new string[250];
            
format(stringsizeof(string), "~w~You are now viewing: ~g~%s~n~/buyint to buy the interior~n~~r~/cancelint to cancel buying it."intInfo[hi][Name]);
            
GameTextForPlayer(playeridstring150003);

            
format(stringsizeof(string), "You are now viewing the house '%s' - /buyint to buy the interior, /cancelint to cancel buying it."intInfo[hi][Name]);
            
SendClientMessage(playeridCOLOR_YELLOWstring);
            
format(stringsizeof(string), "The house interior costs "green"$%d, "white"Notes left in the interior: "red"'%s'"intInfo[hi][i_Price], intInfo[hi][Notes]);
            
SendClientMessage(playerid, -1string);
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HSTORE)
    {
        if(
response || !response)
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HNAME)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HNAMEDIALOG_STYLE_INPUT""green"House Name",\
                
""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100\n"red"Invalid House Name Length.""Configure""Back");
                return 
1;
            }

            new 
string[128];
            
format(string128"You have changed the name of your house to '%s'"inputtext);
            
SendClientMessage(playerid, -1string);

            
format(hInfo[hid][hName], 256"%s"inputtext);

            
SaveHouse(hid);

            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

            
LoadHouse(hid);

            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HPRICE)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }

            new 
string[128];
            
format(string128"You have changed the price of your house to $%d."strval(inputtext));
            
SendClientMessage(playerid, -1string);

            
hInfo[hid][hPrice] = strval(inputtext);

            
SaveHouse(hid);

            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

            
LoadHouse(hid);

            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HSTOREC)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)\n\n"red"Invalid Integer""Configure""Back");
                return 
1;
            }

            
GivePlayerMoney(playerid, -strval(inputtext));
            
hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] + strval(inputtext);

            new 
string[128];
            
format(string128"You have store your $%d into your house safe. ($%d over all in your safe)"strval(inputtext), hInfo[hid][MoneyStore]);
            
SendClientMessage(playerid, -1string);

            
SaveHouse(hid);

            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

            
LoadHouse(hid);

            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HWORLD)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }

            
hInfo[hid][hWorld] = strval(inputtext);

            new 
string[128];
            
format(string128"You have change your inside house virtual world to %d."strval(inputtext));
            
SendClientMessage(playerid, -1string);

            
SaveHouse(hid);

            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

            
LoadHouse(hid);

            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_WCASH)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }
            if(
strval(inputtext) > hInfo[hid][MoneyStore])
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"You do not have that amount of cash on your safe.""Configure""Back");
                return 
1;
            }

            
GivePlayerMoney(playeridstrval(inputtext));
            
hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] - strval(inputtext);

            new 
string[128];
            
format(string128"You have withdrawn a $%d from your house safe. ($%d over all in your safe)"strval(inputtext), hInfo[hid][MoneyStore]);
            
SendClientMessage(playerid, -1string);

            
SaveHouse(hid);

            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

            
LoadHouse(hid);

            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    return 
1;
}

// Commands [ZCMD] //

// Version 1.0 Commands

CMD:hcmds(playeridparams[])
{
    
SendClientMessage(playerid, -1"Jake's House System (v1.0)");
    
SendClientMessage(playeridCOLOR_YELLOW"/buyint - To buy interior (Works only when you choose interior on /hmenu)");
    
SendClientMessage(playeridCOLOR_YELLOW"/cancelint - To cancel the preview interior (Same like /buyint)");
    
SendClientMessage(playeridCOLOR_YELLOW"/buyhouse - /sellhouse (Buys/Sells house, Works only when in-range of the pickup)");
    
SendClientMessage(playeridCOLOR_YELLOW"/hlock - To lock the house (Works only when in-range of pickup/Inside)");
    
SendClientMessage(playeridCOLOR_YELLOW"/hmenu - Player's House Configuration Menu");
    
SendClientMessage(playeridCOLOR_YELLOW"/henter - Enters inside the house (If not locked).");
    
SendClientMessage(playeridCOLOR_YELLOW"/hnote - Adds a note to your house.");
    
SendClientMessage(playeridCOLOR_YELLOW"/hcnote - Checks a note on someones house");
    
SendClientMessage(playerid, -1"For RCONs, /ahcmds for RCON House commands.");
    return 
1;
}

CMD:buyint(playeridparams[])
{
    if(
h_Selection[playerid] == 0)
    {
        
SendClientMessage(playeridCOLOR_RED"<!> You are not on Interior Selection.");
        return 
1;
    }

    new 
id h_Selected[playerid], string[128], hid h_ID[playerid];

    if(
GetPlayerMoney(playerid) < intInfo[id][i_Price])
    {
        
SendClientMessage(playeridCOLOR_RED"<!> You do not have enough money to purchase this interior!");
        
SendClientMessage(playerid, -1"JakHouse_Bot: I suggest you to /cancelint now.");
        return 
1;
    }

    
GivePlayerMoney(playerid, -intInfo[id][i_Price]);
    
GameTextForPlayer(playerid"~g~Interior Purchased!"45003);

    
hInfo[hid][hEnterPos][0] = intInfo[id][SpawnPointX];
    
hInfo[hid][hEnterPos][1] = intInfo[id][SpawnPointY];
    
hInfo[hid][hEnterPos][2] = intInfo[id][SpawnPointZ];
    
hInfo[hid][hEnterPos][3] = intInfo[id][SpawnPointA];
    
hInfo[hid][ExitCPPos][0] = intInfo[id][ExitPointX];
    
hInfo[hid][ExitCPPos][1] = intInfo[id][ExitPointY];
    
hInfo[hid][ExitCPPos][2] = intInfo[id][ExitPointZ];
    
hInfo[hid][hInterior] = intInfo[id][i_Int];
    
format(hInfo[hid][hIName], 256"%s"intInfo[id][Name]);

    
jpInfo[playerid][p_SpawnPoint][0] = intInfo[id][SpawnPointX];
    
jpInfo[playerid][p_SpawnPoint][1] = intInfo[id][SpawnPointY];
    
jpInfo[playerid][p_SpawnPoint][2] = intInfo[id][SpawnPointZ];
    
jpInfo[playerid][p_SpawnPoint][3] = intInfo[id][SpawnPointA];
    
jpInfo[playerid][p_Interior] = hInfo[hid][hInterior];

    
format(stringsizeof(string), "House Interior '%s' has been purchased for $%d, Your house has now had this interior."intInfo[id][Name], intInfo[id][i_Price]);
    
SendClientMessage(playeridCOLOR_GREENstring);
    
format(stringsizeof(string), "Notes left at the house for you: '%s'"intInfo[id][Notes]);
    
SendClientMessage(playeridCOLOR_REDstring);
    
SendClientMessage(playerid, -1"House updated.");

    
SendClientMessage(playeridCOLOR_YELLOW"<!> Your spawnpoint has been changed.");

    
format(hInfo[hid][hNotes], 256"%s"intInfo[id][Notes]);

    
h_Selected[playerid] = -1;
    
h_Selection[playerid] = 0;
    
TogglePlayerControllable(playerid1);
    
SetPlayerInterior(playeridGetPVarInt(playerid"h_Interior"));
    
SetPlayerVirtualWorld(playeridGetPVarInt(playerid"h_World"));
    
SetPlayerPos(playeridGetPVarFloat(playerid"h_X"), GetPVarFloat(playerid"h_Y"), GetPVarFloat(playerid"h_Z"));

    
SaveHouse(hid);

    
DestroyDynamicCP(hInfo[hid][hCP]);
    
DestroyDynamicPickup(hInfo[hid][hPickup]);
    
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
    
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

    
LoadHouse(hid);
    return 
1;
}
CMD:cancelint(playeridparams[])
{
    if(
h_Selection[playerid] == 0)
    {
        
SendClientMessage(playeridCOLOR_RED"<!> You are not on Interior Selection.");
        return 
1;
    }

    
h_Selection[playerid] = 0;
    
h_Selected[playerid] = -1;

    
SetPlayerInterior(playeridGetPVarInt(playerid"h_Interior"));
    
SetPlayerVirtualWorld(playeridGetPVarInt(playerid"h_World"));
    
SetPlayerPos(playeridGetPVarFloat(playerid"h_X"), GetPVarFloat(playerid"h_Y"), GetPVarFloat(playerid"h_Z"));

    
SendClientMessage(playerid, -1"You have decided not to buy the interior.");
    
SendClientMessage(playerid, -1"You've been teleported back to your position.");

    
#if FREEZE_LOAD == true
        
House_Load(playerid);
    
#endif
    
return 1;
}

CMD:ahcmds(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    
SendClientMessage(playerid, -1"Jake's House System (v1.0) - RCON Commands");
    
SendClientMessage(playeridCOLOR_YELLOW"/addhouse - Adds a house");
    
SendClientMessage(playeridCOLOR_YELLOW"/removehouse - Removes a house");
    
SendClientMessage(playeridCOLOR_YELLOW"/gotohouse - Teleports to the house");
    
SendClientMessage(playeridCOLOR_YELLOW"/hinteriors - Lists all the available interior");
    
SendClientMessage(playeridCOLOR_YELLOW"/hmove - Moves the specific houseid to your current location.");
    
SendClientMessage(playeridCOLOR_YELLOW"/asellhouse - Sells the house without doing the actual command.");
    
SendClientMessage(playeridCOLOR_YELLOW"/hnear - Lists all nearby houses within 35 meters.");
    return 
1;
}

CMD:gotohouse(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new 
string[128], id;
    if(
sscanf(params"i"id)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /gotohouse <houseid>");
    if(!
fexist(HousePath(id))) return SendClientMessage(playeridCOLOR_RED"<!> House Slot do not exists.");

    
#if FREEZE_LOAD == true
        
House_Load(playerid);
    
#endif

    
SetPlayerInterior(playerid0);
    
SetPlayerVirtualWorld(playerid0);
    
SetPlayerPos(playeridhInfo[id][hPickupP][0], hInfo[id][hPickupP][1], hInfo[id][hPickupP][2]);

    
format(stringsizeof(string), "You have been successfully teleported to houseID %d (Owned by %s)"idhInfo[id][hOwner]);
    
SendClientMessage(playerid, -1string);
    return 
1;
}

CMD:hinteriors(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new 
string[1200];

    for(new 
a=0a<sizeof(intInfo); a++)
    {
        
format(stringsizeof(string), "%s%s - ID: %d\n"stringintInfo[a][Name], a);
    }
    
ShowPlayerDialog(playeridDIALOG_NULLDIALOG_STYLE_LIST""green"Interior List"string"Close""");
    return 
1;
}

CMD:hmove(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new
        
string[128],
        
hid,
        
Float:p_Pos[3]
    ;

    if(
sscanf(params"i"hid)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /hmove <houseid>");
    if(!
fexist(HousePath(hid))) return SendClientMessage(playeridCOLOR_RED"<!> House does not exists.");

    
GetPlayerPos(playeridp_Pos[0], p_Pos[1], p_Pos[2]);

    
hInfo[hid][hPickupP][0] = p_Pos[0];
    
hInfo[hid][hPickupP][1] = p_Pos[1];
    
hInfo[hid][hPickupP][2] = p_Pos[2];

    
SaveHouse(hid);

    
DestroyDynamicCP(hInfo[hid][hCP]);
    
DestroyDynamicPickup(hInfo[hid][hPickup]);
    
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
    
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

    
LoadHouse(hid);

    
format(stringsizeof(string), "<!> HouseID %d moved at your location."hid);
    
SendClientMessage(playeridCOLOR_GREENstring);
    
format(stringsizeof(string), "Location: %f, %f, %f"p_Pos[0], p_Pos[1], p_Pos[2]);
    
SendClientMessage(playerid, -1string);

    
printf("...HouseID %d moved to %f, %f, %f - JakHouse log"hidp_Pos[0], p_Pos[1], p_Pos[2]);
    return 
1;
}

CMD:addhouse(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new
        
string[128],
        
hid,
        
price,
        
world,
        
level,
        
interior,
        
Float:p_Pos[3]
    ;

    if(
sscanf(params"iiiii"hidlevelpriceworldinterior)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /addhouse <houseid> <level> <price> <world> <interiorid(0-12)>");
    if(
hid || hid MAX_HOUSES) return SendClientMessage(playeridCOLOR_RED"<!> Do not exceed the house limitations of JakHouse.");
    if(
interior || interior 12) return SendClientMessage(playeridCOLOR_RED"<!> Do not exceed the interior limitations of JakHouse.");
    if(
level 0) return SendClientMessage(playeridCOLOR_RED"<!> Level Requirements shouldn't go below under 0.");
    if(
fexist(HousePath(hid))) return SendClientMessage(playeridCOLOR_RED"<!> House Slot used.");

    
GetPlayerPos(playeridp_Pos[0], p_Pos[1], p_Pos[2]);

    
format(hInfo[hid][hName], 256"None");
    
format(hInfo[hid][hOwner], 256"None");
    
hInfo[hid][hLevel] = level;
    
hInfo[hid][hPrice] = price;
    
hInfo[hid][hSale] = 0;
    
hInfo[hid][hInterior] = intInfo[interior][i_Int];
    
hInfo[hid][hWorld] = world;
    
hInfo[hid][hLocked] = 1;
    
hInfo[hid][hEnterPos][0] = intInfo[interior][SpawnPointX];
    
hInfo[hid][hEnterPos][1] = intInfo[interior][SpawnPointY];
    
hInfo[hid][hEnterPos][2] = intInfo[interior][SpawnPointZ];
    
hInfo[hid][hEnterPos][3] = intInfo[interior][SpawnPointA];
    
hInfo[hid][hPickupP][0] = p_Pos[0];
    
hInfo[hid][hPickupP][1] = p_Pos[1];
    
hInfo[hid][hPickupP][2] = p_Pos[2];
    
hInfo[hid][ExitCPPos][0] = intInfo[interior][ExitPointX];
    
hInfo[hid][ExitCPPos][1] = intInfo[interior][ExitPointY];
    
hInfo[hid][ExitCPPos][2] = intInfo[interior][ExitPointZ];
    
format(hInfo[hid][hIName], 256"%s"intInfo[interior][Name]);
    
format(hInfo[hid][hNotes], 256"None");
    
hInfo[hid][MoneyStore] = 0;

    
dini_Create(HousePath(hid));
    
SaveHouse(hid);

    
DestroyDynamicCP(hInfo[hid][hCP]);
    
DestroyDynamicPickup(hInfo[hid][hPickup]);
    
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
    
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

    
LoadHouse(hid);

    
format(stringsizeof(string), "<!> HouseID %d created, Price $%d, Level %d, Virtaul World %d"hidpricelevelworld);
    
SendClientMessage(playeridCOLOR_GREENstring);
    
format(stringsizeof(string), "House created under the interior %s (Int %d)"intInfo[interior][Name], interior);
    
SendClientMessage(playerid, -1string);

    
printf("...HouseID %d created - JakHouse log"hid);
    return 
1;
}
CMD:removehouse(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new
        
string[128],
        
hid
    
;

    if(
sscanf(params"i"hid)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /removehouse <houseid>");
    if(!
fexist(HousePath(hid))) return SendClientMessage(playeridCOLOR_RED"<!> House Slot not used.");

    foreach(new 
Player)
    {
        if(
strcmp(p_Name(playerid), hInfo[hid][hOwner], true) == 0)
        {
            
jpInfo[i][OwnedHouses] = 0;
            
jpInfo[i][OwnedHouses] = 0;
            
jpInfo[i][p_SpawnPoint][0] = 0.0;
            
jpInfo[i][p_SpawnPoint][1] = 0.0;
            
jpInfo[i][p_SpawnPoint][2] = 0.0;
            
jpInfo[i][p_SpawnPoint][3] = 0.0;
            
jpInfo[i][p_Interior] = 0;
            
jpInfo[i][p_Spawn] = 0;

            
SendClientMessage(iCOLOR_YELLOW"Your house has been removed by RCON Admin.");
        }
    }

    new 
file[128];
    
format(filesizeof(file), USER_PATHhInfo[hid][hOwner]);
    
dini_IntSet(file"Houses"jpInfo[playerid][OwnedHouses]=0);
    
dini_FloatSet(file"X"jpInfo[playerid][p_SpawnPoint][0]=0.0);
    
dini_FloatSet(file"Y"jpInfo[playerid][p_SpawnPoint][1]=0.0);
    
dini_FloatSet(file"Z"jpInfo[playerid][p_SpawnPoint][2]=0.0);
    
dini_FloatSet(file"A"jpInfo[playerid][p_SpawnPoint][3]=0.0);
    
dini_IntSet(file"Interior"jpInfo[playerid][p_Interior]=0);
    
dini_IntSet(file"Spawn"jpInfo[playerid][p_Spawn]=0);

    
format(hInfo[hid][hName], 256"None");
    
format(hInfo[hid][hOwner], 256"None");
    
hInfo[hid][hLevel] = 0;
    
hInfo[hid][hPrice] = 0;
    
hInfo[hid][hSale] = 0;
    
hInfo[hid][hInterior] = 2;
    
hInfo[hid][hWorld] = 0;
    
hInfo[hid][hLocked] = 1;
    
hInfo[hid][hEnterPos][0] = 2461.4714;
    
hInfo[hid][hEnterPos][1] = -1698.2998;
    
hInfo[hid][hEnterPos][2] = 1013.5078;
    
hInfo[hid][hEnterPos][3] = 89.5674;
    
hInfo[hid][hPickupP][0] = 0.0;
    
hInfo[hid][hPickupP][1] = 0.0;
    
hInfo[hid][hPickupP][2] = 0.0;
    
hInfo[hid][ExitCPPos][0] = 2465.7527;
    
hInfo[hid][ExitCPPos][1] = -1697.9935;
    
hInfo[hid][ExitCPPos][2] = 1013.5078;
    
hInfo[hid][MoneyStore] = 0;
    
format(hInfo[hid][hNotes], 256"None");

    
fremove(HousePath(hid));

    
DestroyDynamicCP(hInfo[hid][hCP]);
    
DestroyDynamicPickup(hInfo[hid][hPickup]);
    
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
    
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

    
format(stringsizeof(string), "<!> HouseID %d has been successfully removed."hid);
    
SendClientMessage(playeridCOLOR_REDstring);

    
printf("...HouseID %d removed - JakHouse log"hid);
    return 
1;
}

CMD:buyhouse(playeridparams[])
{
    new
        
string[128]
    ;

    new 
h_ID[playerid];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
    {
        if(
hInfo[i][hSale] == 1) return SendClientMessage(playeridCOLOR_RED"<!> This house isn't for sale.");
        if(
GetPlayerMoney(playerid) < hInfo[i][hPrice]) return SendClientMessage(playeridCOLOR_RED"<!> You don't have enough money to buy this house!");
        if(
GetPlayerScore(playerid) < hInfo[i][hLevel]) return SendClientMessage(playeridCOLOR_RED"<!> You don't have enough score to buy this house!");
        if(
jpInfo[playerid][OwnedHouses] == 1) return SendClientMessage(playeridCOLOR_RED"<!> You already owned a house, You can't buy another one.");

        
jpInfo[playerid][OwnedHouses] = 1;

        
jpInfo[playerid][p_SpawnPoint][0] = hInfo[i][hEnterPos][0];
        
jpInfo[playerid][p_SpawnPoint][1] = hInfo[i][hEnterPos][1];
        
jpInfo[playerid][p_SpawnPoint][2] = hInfo[i][hEnterPos][2];
        
jpInfo[playerid][p_SpawnPoint][3] = hInfo[i][hEnterPos][3];
        
jpInfo[playerid][p_Interior] = hInfo[i][hInterior];

        
hInfo[i][hSale] = 1;
        
hInfo[i][hLocked] = 0;
        
format(hInfo[i][hOwner], 256"%s"p_Name(playerid));
        
GivePlayerMoney(playerid, -hInfo[i][hPrice]);
        
format(string128"You have bought this house for $%d."hInfo[i][hPrice]);
        
SendClientMessage(playeridCOLOR_YELLOWstring);

        
SaveHouse(i);

        
DestroyDynamicCP(hInfo[i][hCP]);
        
DestroyDynamicPickup(hInfo[i][hPickup]);
        
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
        
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

        
LoadHouse(i);
    }
    else
    {
        
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    }
    return 
1;
}

CMD:asellhouse(playeridparams[])
{
    new
        
string[128]
    ;

    new 
id;
    if(
sscanf(params"i"id)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /asellhouse <houseid>");
    if(!
fexist(HousePath(id))) return SendClientMessage(playeridCOLOR_RED"<!> House Slot do not exists.");

    
format(string128"You have admin-sold this house for $%d, The money wasn't given to you, given to the owner instead."hInfo[id][hPrice]);
    
SendClientMessage(playerid, -1string);
    
format(string128"The house safe also has $%d which was given to the owner."hInfo[id][MoneyStore]);
    
SendClientMessage(playerid, -1string);

    foreach(new 
Player)
    {
        if(
strcmp(p_Name(playerid), hInfo[id][hOwner], true) == 0)
        {
            
jpInfo[i][OwnedHouses] = 0;
            
jpInfo[i][p_SpawnPoint][0] = 0.0;
            
jpInfo[i][p_SpawnPoint][1] = 0.0;
            
jpInfo[i][p_SpawnPoint][2] = 0.0;
            
jpInfo[i][p_SpawnPoint][3] = 0.0;
            
jpInfo[i][p_Interior] = 0;
            
jpInfo[i][p_Spawn] = 0;

            
GivePlayerMoney(ihInfo[id][hPrice]);
            
GivePlayerMoney(ihInfo[id][MoneyStore]);
            
format(stringsizeof(string), "You received a $%d (Including House Safe), Admin %s has sold your house."hInfo[id][hPrice]+hInfo[id][MoneyStore], p_Name(playerid));
            
//Var MoneyStore plus hPrice = Total $%d, Nothing was added if MoneyStore is 0.
            
SendClientMessage(iCOLOR_YELLOWstring);
            
SendClientMessage(playeridCOLOR_GREEN"The owner is online, the money was received.");
        }
    }

    new 
file[128];
    
format(filesizeof(file), USER_PATHhInfo[id][hOwner]);
    
dini_IntSet(file"Houses"jpInfo[playerid][OwnedHouses]=0);
    
dini_FloatSet(file"X"jpInfo[playerid][p_SpawnPoint][0]=0.0);
    
dini_FloatSet(file"Y"jpInfo[playerid][p_SpawnPoint][1]=0.0);
    
dini_FloatSet(file"Z"jpInfo[playerid][p_SpawnPoint][2]=0.0);
    
dini_FloatSet(file"A"jpInfo[playerid][p_SpawnPoint][3]=0.0);
    
dini_IntSet(file"Interior"jpInfo[playerid][p_Interior]=0);
    
dini_IntSet(file"Spawn"jpInfo[playerid][p_Spawn]=0);

    
hInfo[id][hSale] = 0;
    
hInfo[id][hLocked] = 1;
    
format(hInfo[id][hOwner], 256"None");
    
format(hInfo[id][hName], 256"None");
    
hInfo[id][MoneyStore] = 0;

    
SaveHouse(id);

    
DestroyDynamicCP(hInfo[id][hCP]);
    
DestroyDynamicPickup(hInfo[id][hPickup]);
    
DestroyDynamicMapIcon(hInfo[id][hMapIcon]);
    
DestroyDynamic3DTextLabel(hInfo[id][hLabel]);

    
LoadHouse(id);
    return 
1;
}

CMD:sellhouse(playeridparams[])
{
    new
        
string[128]
    ;

    new 
h_ID[playerid];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
h_Inside[playerid] == -1)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
        {
            if(
hInfo[i][hSale] == 0) return SendClientMessage(playeridCOLOR_RED"<!> This house is already for sale.");
            if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
            {
                
jpInfo[playerid][OwnedHouses] = 0;
                
jpInfo[playerid][p_SpawnPoint][0] = 0.0;
                
jpInfo[playerid][p_SpawnPoint][1] = 0.0;
                
jpInfo[playerid][p_SpawnPoint][2] = 0.0;
                
jpInfo[playerid][p_SpawnPoint][3] = 0.0;
                
jpInfo[playerid][p_Interior] = 0;
                
jpInfo[playerid][p_Spawn] = 0;

                
hInfo[i][hSale] = 0;
                
hInfo[i][hLocked] = 1;
                
format(hInfo[i][hOwner], 256"None");
                
format(hInfo[i][hName], 256"None");
                
GivePlayerMoney(playeridhInfo[i][hPrice]);
                
GivePlayerMoney(playeridhInfo[i][MoneyStore]);
                
format(string128"You have sold this house for $%d."hInfo[i][hPrice]);
                
SendClientMessage(playeridCOLOR_YELLOWstring);
                
format(string128"You have also got $%d from your house safe."hInfo[i][MoneyStore]);
                
SendClientMessage(playerid, -1string);
                
hInfo[i][MoneyStore] = 0;

                
SaveHouse(i);

                
DestroyDynamicCP(hInfo[i][hCP]);
                
DestroyDynamicPickup(hInfo[i][hPickup]);
                
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
                
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

                
LoadHouse(i);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
        }
    }
    else
    {
        if(
hInfo[i][hSale] == 0) return SendClientMessage(playeridCOLOR_RED"<!> This house is already for sale.");
        if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
        {
            
jpInfo[playerid][OwnedHouses] = 0;
            
jpInfo[playerid][p_SpawnPoint][0] = 0.0;
            
jpInfo[playerid][p_SpawnPoint][1] = 0.0;
            
jpInfo[playerid][p_SpawnPoint][2] = 0.0;
            
jpInfo[playerid][p_SpawnPoint][3] = 0.0;
            
jpInfo[playerid][p_Interior] = 0;
            
jpInfo[playerid][p_Spawn] = 0;

            
hInfo[i][hSale] = 0;
            
hInfo[i][hLocked] = 1;
            
format(hInfo[i][hOwner], 256"None");
            
format(hInfo[i][hName], 256"None");
            
GivePlayerMoney(playeridhInfo[i][hPrice]);
            
format(string128"You have sold this house for $%d."hInfo[i][hPrice]);
            
SendClientMessage(playeridCOLOR_YELLOWstring);
            
GivePlayerMoney(playeridhInfo[i][MoneyStore]);
            
format(string128"You have also got $%d from your house safe."hInfo[i][MoneyStore]);
            
SendClientMessage(playerid, -1string);
            
hInfo[i][MoneyStore] = 0;

            
SaveHouse(i);

            
DestroyDynamicCP(hInfo[i][hCP]);
            
DestroyDynamicPickup(hInfo[i][hPickup]);
            
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

            
LoadHouse(i);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
        }
    }
    return 
1;
}

CMD:henter(playeridparams[])
{
    new 
h_ID[playerid];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
    {
        if(
hInfo[i][hLocked] == 1) return SendClientMessage(playeridCOLOR_RED"<!> House is locked!");
        
#if FREEZE_LOAD == true
            
House_Load(playerid);

            
SetPlayerPos(playeridhInfo[i][hEnterPos][0], hInfo[i][hEnterPos][1], hInfo[i][hEnterPos][2]);
            
SetPlayerFacingAngle(playeridhInfo[i][hEnterPos][3]);
            
SetPlayerInterior(playeridhInfo[i][hInterior]);
            
SetPlayerVirtualWorld(playeridhInfo[i][hWorld]);
        
#else
            
SetPlayerPos(playeridhInfo[i][hEnterPos][0], hInfo[i][hEnterPos][1], hInfo[i][hEnterPos][2]);
            
SetPlayerFacingAngle(playeridhInfo[i][hEnterPos][3]);
            
SetPlayerInterior(playeridhInfo[i][hInterior]);
            
SetPlayerVirtualWorld(playeridhInfo[i][hWorld]);
        
#endif

        
h_Inside[playerid] = i;
    }
    else
    {
        
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    }
    return 
1;
}

CMD:hlock(playeridparams[])
{
    new 
h_ID[playerid];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
h_Inside[playerid] == -1)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
        {
            if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
            {
                if(
hInfo[i][hLocked] == 0)
                {
                    
hInfo[i][hLocked] = 1;
                    
SendClientMessage(playeridCOLOR_RED"You have locked your house.");
                }
                else if(
hInfo[i][hLocked] == 1)
                {
                    
hInfo[i][hLocked] = 0;
                    
SendClientMessage(playeridCOLOR_GREEN"You have unlocked your house.");
                }

                
SaveHouse(i);

                
DestroyDynamicCP(hInfo[i][hCP]);
                
DestroyDynamicPickup(hInfo[i][hPickup]);
                
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
                
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

                
LoadHouse(i);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
        }
    }
    else
    {
        if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
        {
            if(
hInfo[i][hLocked] == 0)
            {
                
hInfo[i][hLocked] = 1;
                
SendClientMessage(playeridCOLOR_RED"You have locked your house.");
            }
            else if(
hInfo[i][hLocked] == 1)
            {
                
hInfo[i][hLocked] = 0;
                
SendClientMessage(playeridCOLOR_GREEN"You have unlocked your house.");
            }

            
SaveHouse(i);

            
DestroyDynamicCP(hInfo[i][hCP]);
            
DestroyDynamicPickup(hInfo[i][hPickup]);
            
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

            
LoadHouse(i);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
        }
    }
    return 
1;
}

CMD:hnote(playeridparams[])
{
    new 
h_ID[playerid];
    new 
string[128], note[128];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
h_Inside[playerid] == -1)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
        {
            if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
            {
                if(
sscanf(params"s[128]"note)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /hnote <note>");

                
format(hInfo[i][hNotes], 256"%s"note);

                
SaveHouse(i);

                
DestroyDynamicCP(hInfo[i][hCP]);
                
DestroyDynamicPickup(hInfo[i][hPickup]);
                
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
                
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

                
LoadHouse(i);

                
format(stringsizeof(string), "You have replaced the old notes with a new one: %s"note);
                
SendClientMessage(playerid, -1string);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
        }
    }
    else
    {
        if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
        {
            if(
sscanf(params"s[128]"note)) return SendClientMessage(playeridCOLOR_YELLOW"USAGE: /hnote <note>");

            
format(hInfo[i][hNotes], 256"%s"note);

            
SaveHouse(i);

            
DestroyDynamicCP(hInfo[i][hCP]);
            
DestroyDynamicPickup(hInfo[i][hPickup]);
            
DestroyDynamicMapIcon(hInfo[i][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[i][hLabel]);

            
LoadHouse(i);

            
format(stringsizeof(string), "You have replaced the old notes with a new one: %s"note);
            
SendClientMessage(playerid, -1string);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
        }
    }
    return 
1;
}

CMD:hcnote(playeridparams[])
{
    new 
h_ID[playerid];
    new 
string[150];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
h_Inside[playerid] == -1)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
        {
            if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
            {
                
format(stringsizeof(string), "Note: %s"hInfo[i][hNotes]);
                
SendClientMessage(playeridCOLOR_REDstring);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
        }
    }
    else
    {
        if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
        {
            
format(stringsizeof(string), "Note: %s"hInfo[i][hNotes]);
            
SendClientMessage(playeridCOLOR_REDstring);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
        }
    }
    return 
1;
}

CMD:hmenu(playeridparams[])
{
    new 
h_ID[playerid];

    if(
== -1) return SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
    if(
h_Inside[playerid] == -1)
    {
        if(
IsPlayerInRangeOfPoint(playerid1.5hInfo[i][hPickupP][0], hInfo[i][hPickupP][1], hInfo[i][hPickupP][2]))
        {
            if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
            {
                
ShowPlayerDialog(playeridDIALOG_HMENUDIALOG_STYLE_LIST""red"House Configuration",\
                
""yellow"House Name\n"green"House Price ($)\n"yellow"Store Cash ($)\n"green"Withdraw Cash ($)\n"yellow"Storage Information\n"green"Virtual World\n"yellow"Interior\n"green"Spawn at Home""Configure""Cancel");
            }
            else
            {
                
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You are not near any house.");
        }
    }
    else
    {
        if(
strcmp(hInfo[i][hOwner], p_Name(playerid), true) == 0)
        {
            
ShowPlayerDialog(playeridDIALOG_HMENUDIALOG_STYLE_LIST""red"House Configuration",\
            
""yellow"House Name\n"green"House Price ($)\n"yellow"Store Cash ($)\n"green"Withdraw Cash ($)\n"yellow"Storage Information\n"green"Virtual World\n"yellow"Interior\n"green"Spawn at Home""Configure""Cancel");
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"<!> You do not own the house.");
        }
    }
    return 
1;
}

Float:GetDistance(Floatx1Floaty1Floatz1Floatx2Floaty2Floatz2)
{
    new 
Float:d;
    
+= floatpower(x1-x22.0 );
    
+= floatpower(y1-y22.0 );
    
+= floatpower(z1-z22.0 );
    
floatsqroot(d);
    return 
d;
}

CMD:hnear(playeridparams[])
{
    if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridCOLOR_RED"<!> You are not a RCON Admin to use this command!");

    new 
hcount=0;

    
SendClientMessage(playeridCOLOR_RED"* Listing all JakHouses within 35 meters of you");

    new 
Float:XFloat:YFloat:Z;
    new 
Float:X2Float:Y2Float:Z2;

    
GetPlayerPos(playeridX2Y2Z2);

    for(new 
i=0MAX_HOUSESi++)
    {
         
hInfo[i][hPickupP][0];
        
hInfo[i][hPickupP][1];
        
hInfo[i][hPickupP][2];
        if(
IsPlayerInRangeOfPoint(playerid35XYZ))
        {
            
hcount++;
            new 
string[128];
            
format(stringsizeof(string), "(%d) Owned by %s - Price: $%d | %f from you"ihInfo[i][hOwner], hInfo[i][hPrice], GetDistance(XYZX2Y2Z2));
            
SendClientMessage(playeridCOLOR_WHITEstring);
        }
    }

    if(
hcount==0) return SendClientMessage(playerid, -1"No houses found nearby you.");
    else
    {
        new 
str[128];
        
format(strsizeof(str), "There are "green"%d "white"houses founded on your position."hcount);
        
SendClientMessage(playerid, -1str);
    }
    return 
1;
}

//
//============================================================================//
// Stocks

forward HouseUnload(playerid);
public 
HouseUnload(playerid)
{
    
SetCameraBehindPlayer(playerid);
    
GameTextForPlayer(playerid"~g~Loaded!"25003);
    return 
TogglePlayerControllable(playerid1);
}

stock House_Load(playerid)
{
    
TogglePlayerControllable(playerid0);
    
SetCameraBehindPlayer(playerid);
    
GameTextForPlayer(playerid"~w~Loading..."1000*FREEZE_TIME3);
    return 
SetTimerEx("HouseUnload"1000*FREEZE_TIMEfalse"d"playerid);
}

stock Player_Save(playerid)
{
    
dini_IntSet(PlayerPath(playerid), "Houses"jpInfo[playerid][OwnedHouses]);
    
dini_FloatSet(PlayerPath(playerid), "X"jpInfo[playerid][p_SpawnPoint][0]);
    
dini_FloatSet(PlayerPath(playerid), "Y"jpInfo[playerid][p_SpawnPoint][1]);
    
dini_FloatSet(PlayerPath(playerid), "Z"jpInfo[playerid][p_SpawnPoint][2]);
    
dini_FloatSet(PlayerPath(playerid), "A"jpInfo[playerid][p_SpawnPoint][3]);
    
dini_IntSet(PlayerPath(playerid), "Interior"jpInfo[playerid][p_Interior]);
    
dini_IntSet(PlayerPath(playerid), "Spawn"jpInfo[playerid][p_Spawn]);
    return 
1;
}
stock Player_Load(playerid)
{
    
jpInfo[playerid][OwnedHouses] = dini_Int(PlayerPath(playerid), "Houses");
    
jpInfo[playerid][p_SpawnPoint][0] = dini_Float(PlayerPath(playerid), "X");
    
jpInfo[playerid][p_SpawnPoint][1] = dini_Float(PlayerPath(playerid), "Y");
    
jpInfo[playerid][p_SpawnPoint][2] = dini_Float(PlayerPath(playerid), "Z");
    
jpInfo[playerid][p_SpawnPoint][3] = dini_Float(PlayerPath(playerid), "A");
    
jpInfo[playerid][p_Interior] = dini_Int(PlayerPath(playerid), "Interior");
    
jpInfo[playerid][p_Spawn] = dini_Int(PlayerPath(playerid), "Spawn");
    return 
1;
}

stock isnumeric(str[])
{
    new
        
ch,
        
i;
    while ((
ch str[i++])) if (!('0' <= ch <= '9')) return 0;
    return 
1;
}

stock p_Name(playerid)
{
    new 
pName[24];
    
GetPlayerName(playeridpName24);
    return 
pName;
}

stock SaveHouse(houseid)
{
    
dini_Set(HousePath(houseid), "Name"hInfo[houseid][hName]);
    
dini_Set(HousePath(houseid), "Owner"hInfo[houseid][hOwner]);
    
dini_Set(HousePath(houseid), "InteriorName"hInfo[houseid][hIName]);
    
dini_Set(HousePath(houseid), "Notes"hInfo[houseid][hNotes]);
    
dini_IntSet(HousePath(houseid), "Level"hInfo[houseid][hLevel]);
    
dini_IntSet(HousePath(houseid), "Price"hInfo[houseid][hPrice]);
    
dini_IntSet(HousePath(houseid), "Sale"hInfo[houseid][hSale]);
    
dini_IntSet(HousePath(houseid), "Interior"hInfo[houseid][hInterior]);
    
dini_IntSet(HousePath(houseid), "World"hInfo[houseid][hWorld]);
    
dini_IntSet(HousePath(houseid), "Locked"hInfo[houseid][hLocked]);
    
dini_FloatSet(HousePath(houseid), "xPoint"hInfo[houseid][hEnterPos][0]);
    
dini_FloatSet(HousePath(houseid), "yPoint"hInfo[houseid][hEnterPos][1]);
    
dini_FloatSet(HousePath(houseid), "zPoint"hInfo[houseid][hEnterPos][2]);
    
dini_FloatSet(HousePath(houseid), "aPoint"hInfo[houseid][hEnterPos][3]);
    
dini_FloatSet(HousePath(houseid), "enterX"hInfo[houseid][hPickupP][0]);
    
dini_FloatSet(HousePath(houseid), "enterY"hInfo[houseid][hPickupP][1]);
    
dini_FloatSet(HousePath(houseid), "enterZ"hInfo[houseid][hPickupP][2]);
    
dini_FloatSet(HousePath(houseid), "exitX"hInfo[houseid][ExitCPPos][0]);
    
dini_FloatSet(HousePath(houseid), "exitY"hInfo[houseid][ExitCPPos][1]);
    
dini_FloatSet(HousePath(houseid), "exitZ"hInfo[houseid][ExitCPPos][2]);
    
dini_IntSet(HousePath(houseid), "MoneySafe"hInfo[houseid][MoneyStore]);
    
printf("... House ID %d from JakHouse has been saved."houseid);
    return 
1;
}

stock LoadHouse(houseid)
{
    
format(hInfo[houseid][hName], 256"%s"dini_Get(HousePath(houseid), "Name"));
    
format(hInfo[houseid][hOwner], 256"%s"dini_Get(HousePath(houseid), "Owner"));
    
format(hInfo[houseid][hIName], 256"%s"dini_Get(HousePath(houseid), "InteriorName"));
    
format(hInfo[houseid][hNotes], 256"%s"dini_Get(HousePath(houseid), "Notes"));
    
hInfo[houseid][hLevel] = dini_Int(HousePath(houseid), "Level");
    
hInfo[houseid][hPrice] = dini_Int(HousePath(houseid), "Price");
    
hInfo[houseid][hSale] = dini_Int(HousePath(houseid), "Sale");
    
hInfo[houseid][hInterior] = dini_Int(HousePath(houseid), "Interior");
    
hInfo[houseid][hWorld] = dini_Int(HousePath(houseid), "World");
    
hInfo[houseid][hLocked] = dini_Int(HousePath(houseid), "Locked");
    
hInfo[houseid][hEnterPos][0] = dini_Float(HousePath(houseid), "xPoint");
    
hInfo[houseid][hEnterPos][1] = dini_Float(HousePath(houseid), "yPoint");
    
hInfo[houseid][hEnterPos][2] = dini_Float(HousePath(houseid), "zPoint");
    
hInfo[houseid][hEnterPos][3] = dini_Float(HousePath(houseid), "aPoint");
    
hInfo[houseid][hPickupP][0] = dini_Float(HousePath(houseid), "enterX");
    
hInfo[houseid][hPickupP][1] = dini_Float(HousePath(houseid), "enterY");
    
hInfo[houseid][hPickupP][2] = dini_Float(HousePath(houseid), "enterZ");
    
hInfo[houseid][ExitCPPos][0] = dini_Float(HousePath(houseid), "exitX");
    
hInfo[houseid][ExitCPPos][1] = dini_Float(HousePath(houseid), "exitY");
    
hInfo[houseid][ExitCPPos][2] = dini_Float(HousePath(houseid), "exitZ");
    
hInfo[houseid][MoneyStore] = dini_Int(HousePath(houseid), "MoneySafe");

    new 
string[256];

    if(
hInfo[houseid][hSale] == 0)
    {
        
format(string256""white"HouseID: "red"%d\n"green"House for Sale!\n"white"Price: "red"$%d\n"white"Interior: "green"%s\n"white"Level: "red"%d\n\n"white"/buyhouse to buy the house."houseidhInfo[houseid][hPrice], hInfo[houseid][hIName], hInfo[houseid][hLevel]);
        
hInfo[houseid][hMapIcon] = CreateDynamicMapIcon(hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], SALE_ICON, -100, -1STREAM_DISTANCESMAPICON_LOCAL);
        
hInfo[houseid][hPickup] = CreateDynamicPickup(SALE_PICKUP1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], 00, -1STREAM_DISTANCES);
    }
    else
    {
        if(
hInfo[houseid][hLocked] == 0)
        {
            if(
strcmp(hInfo[houseid][hName], "None"true) == 0)
            {
                
format(string256""white"HouseID: "red"%d\n"green"Unlock\n"white"House Own by: "red"%s\n"white"Interior: "green"%s\n"white"Level: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hIName], hInfo[houseid][hLevel], hInfo[houseid][hPrice]);
            }
            else
            {
                
format(string256""white"HouseID: "red"%d\n"green"Unlock\n"white"House Own by: "red"%s\n"white"Name: "green"%s\n"white"Interior: "red"%s\n"white"Level: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hName], hInfo[houseid][hIName], hInfo[houseid][hLevel], hInfo[houseid][hPrice]);
            }
        }
        else
        {
            if(
strcmp(hInfo[houseid][hName], "None"true) == 0)
            {
                
format(string256""white"HouseID: "red"%d\n"red"Locked\n"white"House Own by: "red"%s\n"white"Interior: "green"%s\n"white"Level: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hIName], hInfo[houseid][hLevel], hInfo[houseid][hPrice]);
            }
            else
            {
                
format(string256""white"HouseID: "red"%d\n"red"Locked\n"white"House Own by: "red"%s\n"white"Name: "green"%s\n"white"Interior: "red"%s\n"white"Level: "red"%d\n"white"Price: "green"$%d\n\n"white"Type /henter to enter inside."houseidhInfo[houseid][hOwner], hInfo[houseid][hName], hInfo[houseid][hIName], hInfo[houseid][hLevel], hInfo[houseid][hPrice]);
            }
        }
        
hInfo[houseid][hMapIcon] = CreateDynamicMapIcon(hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], NOTSALE_ICON, -100, -1STREAM_DISTANCESMAPICON_LOCAL);
        
hInfo[houseid][hPickup] = CreateDynamicPickup(NOTSALE_PICKUP1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], 00, -1STREAM_DISTANCES);
    }
    
hInfo[houseid][hLabel] = CreateDynamic3DTextLabel(string, -1hInfo[houseid][hPickupP][0], hInfo[houseid][hPickupP][1], hInfo[houseid][hPickupP][2], STREAM_DISTANCESINVALID_PLAYER_IDINVALID_VEHICLE_ID100, -1STREAM_DISTANCES);
    
hInfo[houseid][hCP] = CreateDynamicCP(hInfo[houseid][ExitCPPos][0], hInfo[houseid][ExitCPPos][1], hInfo[houseid][ExitCPPos][2], 1.0hInfo[houseid][hWorld], hInfo[houseid][hInterior], -115.0);
    return 
1;
}

stock HousePath(houseid)
{
    new 
hfile[128];
    
format(hfile128HOUSE_PATHhouseid);
    return 
hfile;
}

stock PlayerPath(playerid)
{
    new 
pfile[128];
    
format(pfile128USER_PATHp_Name(playerid));
    return 
pfile;
}

//
//============================================================================//
//

//EOF 
Screenshot of the foreach include..

Reply
#10

EDIT: iLearner i've to change it from foreach.inc?
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)