How to change interior for your house
#1

Hello, I am currently making a prison roleplay. So i am making buyable cells, but i dont know how to set the interior, at the enter and exit.

Here is my house code:

pawn Код:
2505.9890,-1701.6159,1031.4262,2506.1347,-1700.5954,1031.4262 ,0,0,0,0,2,0,Prison,Prison Cell 1,25000,0,0,0,1,0,0,1000,1,0,418,-1,-1,334,3,0
And this is the houseinfo in the script:

pawn Код:
public LoadProperty()
{
    new arrCoords[30][64];
    new strFromFile2[256];
    new File: file = fopen("cfg/property.cfg", io_read);
    if (file)
    {
        new idx;
        while (idx < sizeof(HouseInfo))
        {
            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, ',');
            HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
            HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
            HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
            HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
            HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
            HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
            HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
            HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
            HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
            HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
            HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
            HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
            //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
            strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
            strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
            HouseInfo[idx][hValue] = strval(arrCoords[14]);
            HouseInfo[idx][hHel] = strval(arrCoords[15]);
            HouseInfo[idx][hArm] = strval(arrCoords[16]);
            HouseInfo[idx][hInt] = strval(arrCoords[17]);
            HouseInfo[idx][hLock] = strval(arrCoords[18]);
            HouseInfo[idx][hOwned] = strval(arrCoords[19]);
            HouseInfo[idx][hRooms] = strval(arrCoords[20]);
            HouseInfo[idx][hRent] = strval(arrCoords[21]);
            HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
            HouseInfo[idx][hTakings] = strval(arrCoords[23]);
            HouseInfo[idx][hVec] = strval(arrCoords[24]);
            if(HouseInfo[idx][hVec] == 457)
            {
                HouseInfo[idx][hVec] = 411;
            }
            HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
            HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
            HouseInfo[idx][hDate] = strval(arrCoords[27]);
            HouseInfo[idx][hLevel] = strval(arrCoords[28]);
            HouseInfo[idx][hWorld] = strval(arrCoords[29]);

            printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
EDIT: I want the interior to be (2),
And i cant get the pickup to show up.

Thanks, alex
Reply
#2

anybody knows?
Reply
#3

In here is Interiors ID's
Reply
#4

hmm, i know what interior i want. I want it to change when i enter the house, and when i leave the house. I want the interior to be id "2". And i cant get the pickup to appear in the interior that i am using.
Reply
#5

What Housing sys ur using ?
Reply
#6

I am currently editing GTA:RP's House system. Here is the houses i have edited:

pawn Код:
2505.989013,-1701.615844,1031.426147,2506.134765,-1700.595458,1031.426147,0,0,0,0,0,0,Prison,Prison Cell 1,20000,0,0,0,1,0,0,1000,0,0,418,-1,-1,364,2,0
2510.7783,-1701.4842,1031.4262,2510.7321,-1700.6016,1031.4262,0,0,0,0,0,0,Prison,Prison Cell 2,20000,0,0,1,1,0,1,50,0,0,418,-1,-1,334,2,1
2515.5078,-1701.8061,1031.4262,2515.5307,-1700.6363,1031.4262,0,0,0,0,0,0,Prison, Prison Cell 3,20000,0,0,2,1,0,1,2000,1,0,418,-1,-1,334,2,2
2520.0893,-1701.5958,1031.4262,2520.2253,-1700.7216,1031.4262,0,0,0,0,0,0,Prison, Prison Cell 4,20000,0,0,4,1,0,1,2000,1,0,418,-1,-1,334,2,3
2524.8303,-1701.5781,1031.4262,2524.9245,-1700.7016,1031.4262,0,0,0,0,0,0,Prison, Prison Cell 5,20000,0,0,6,1,0,0,500,1,0,418,-1,-1,334,2,4
2529.7194,-1701.5985,1031.4262,2529.5300,-1700.7233,1031.4262,0,0,0,0,0,0,Prison,Prison Cell 6,20000,0,0,12,1,0,1,200,1,0,418,-1,-1,334,2,5
And this is my LoadProperty Code
pawn Код:
public LoadProperty()
{
    new arrCoords[30][64];
    new strFromFile2[256];
    new File: file = fopen("cfg/property.cfg", io_read);
    if (file)
    {
        new idx;
        while (idx < sizeof(HouseInfo))
        {
            fread(file, strFromFile2);
            split(strFromFile2, arrCoords, ',');
            HouseInfo[idx][hEntrancex] = floatstr(arrCoords[0]);
            HouseInfo[idx][hEntrancey] = floatstr(arrCoords[1]);
            HouseInfo[idx][hEntrancez] = floatstr(arrCoords[2]);
            HouseInfo[idx][hExitx] = floatstr(arrCoords[3]);
            HouseInfo[idx][hExity] = floatstr(arrCoords[4]);
            HouseInfo[idx][hExitz] = floatstr(arrCoords[5]);
            HouseInfo[idx][hHealthx] = strval(arrCoords[6]);
            HouseInfo[idx][hHealthy] = strval(arrCoords[7]);
            HouseInfo[idx][hHealthz] = strval(arrCoords[8]);
            HouseInfo[idx][hArmourx] = strval(arrCoords[9]);
            HouseInfo[idx][hArmoury] = strval(arrCoords[10]);
            HouseInfo[idx][hArmourz] = strval(arrCoords[11]);
            //printf("HouseInfo hEntrancez %f",HouseInfo[idx][hEntrancez]);
            strmid(HouseInfo[idx][hOwner], arrCoords[12], 0, strlen(arrCoords[12]), 255);
            strmid(HouseInfo[idx][hDiscription], arrCoords[13], 0, strlen(arrCoords[13]), 255);
            HouseInfo[idx][hValue] = strval(arrCoords[14]);
            HouseInfo[idx][hHel] = strval(arrCoords[15]);
            HouseInfo[idx][hArm] = strval(arrCoords[16]);
            HouseInfo[idx][hInt] = strval(arrCoords[17]);
            HouseInfo[idx][hLock] = strval(arrCoords[18]);
            HouseInfo[idx][hOwned] = strval(arrCoords[19]);
            HouseInfo[idx][hRooms] = strval(arrCoords[20]);
            HouseInfo[idx][hRent] = strval(arrCoords[21]);
            HouseInfo[idx][hRentabil] = strval(arrCoords[22]);
            HouseInfo[idx][hTakings] = strval(arrCoords[23]);
            HouseInfo[idx][hVec] = strval(arrCoords[24]);
            if(HouseInfo[idx][hVec] == 457)
            {
                HouseInfo[idx][hVec] = 411;
            }
            HouseInfo[idx][hVcol1] = strval(arrCoords[25]);
            HouseInfo[idx][hVcol2] = strval(arrCoords[26]);
            HouseInfo[idx][hDate] = strval(arrCoords[27]);
            HouseInfo[idx][hLevel] = strval(arrCoords[28]);
            HouseInfo[idx][hWorld] = strval(arrCoords[29]);

            printf("HouseInfo:%d Owner:%s hTakings %d hVec %d",idx,HouseInfo[idx][hOwner],HouseInfo[idx][hTakings],HouseInfo[idx][hVec]);
            idx++;
        }
        fclose(file);
    }
    return 1;
}
Reply
#7

anyone knows?
Reply
#8

Quote:
Originally Posted by Tutrix
Посмотреть сообщение
anyone knows?
Do you want a command for this or do you want to edit it in the textfile?
Reply
#9

I wanna edit the property.cfg
Reply
#10

Quote:
Originally Posted by Tutrix
Посмотреть сообщение
I wanna edit the property.cfg
pawn Код:
2505.9890,-1701.6159,1031.4262,2506.1347,-1700.5954,1031.4262 ,0,0,0,0,2,0,Prison,Prison Cell 1,25000,0,0,THIS_IS_THE_INTERIOR_ID,1,0,0,1000,1,0,418,-1,-1,334,3,0
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)