Adding Interior To Houses
#1

I've attempted different ways of adding interiors to the houses, I seem to get halfway and mess up every time. I'm needing the command and the actual add-on to the stock.

I'm really quite stomped on this one, thanks

pawn Код:
new PropertyCount;
new Property[200][Prop];

    //Syntax for CreateProperty:CreateProperty(Float:x,Float:y,Float:z,Cost);
    CreateProperty(-2027.731201,-42.946727,38.804687,80000);

stock CreateProperty(Float:x,Float:y,Float:z,cost)
{
    new part[24];
    PropertyCount++;
    new labelstring[40];
    if (PropertyCount >=200) return printf("You have exceeded the MAX_PROPS Limit");
    new id=PropertyCount;
    Property[id][prX]=x;
    Property[id][prY]=y;
    Property[id][prZ]=z;
    Property[id][pCost]=cost;
    INI_Create("Property.ini");
    if(fexist("Property.ini"))
    {
        format(part,sizeof(part),"%d",id);
        format(Property[id][pOwner],25,INI_Get("Property.ini",part));
        if(strcmp(Property[id][pOwner]," ")==0){format(Property[id][pOwner],25,"None");}
        if(strcmp(Property[id][pOwner],"None")==0)
        {
            format(labelstring,sizeof(labelstring),"$%i",Property[id][pCost]);
            Property[id][pPickup]=CreateDynamicPickup(1273,1,Property[id][prX],Property[id][prY],Property[id][prZ],-1);
            Property[id][pMapicon]=CreateDynamicMapIcon(Property[id][prX],Property[id][prY],Property[id][prZ],31,0,-1,-1,-1,250.0);
            Property[id][pLabel]=CreateDynamic3DTextLabel(labelstring,0xFFFFFFFF,Property[id][prX],Property[id][prY],Property[id][prZ],6.0);
        }
        if(strcmp(Property[id][pOwner],"None") !=0)
        {
            format(labelstring,sizeof(labelstring),"Owner: %s",Property[id][pOwner]);
            Property[id][pPickup]=CreateDynamicPickup(1272,1,Property[id][prX],Property[id][prY],Property[id][prZ],-1);
            Property[id][pLabel]=CreateDynamic3DTextLabel(labelstring,0xFFFFFFFF,Property[id][prX],Property[id][prY],Property[id][prZ],6.0);
        }
    }
    return 1;
}
Reply
#2

Adapte na sua gm

Код:
if(strcmp(cmd,"/mudarinterior",true)==0)
{
new House = PlayerInfo[playerid][pPHousekey];
if (House != 9999 && strcmp(playername, HouseInfo[PlayerInfo[playerid][pPHousekey]][hOwner], true) == 0)
{
tmp = strtok(cmdtext, idx);
if(HouseEntered[playerid] != 9999)
{
SendClientMessage(playerid,COLOR_GREY,"Vocк nгo pode usar esse comando dentro de uma casa");
return 1;
}
if(GetPlayerMoneyEx(playerid) < 10000)
{
SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo tem dinheiro suficiente R$10000");
return 1;
}
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GREY,"USE: /mudarinterior [1 a 10]");
return 1;
}
new idcasa = strval(tmp);
switch (idcasa)
{
case 1:
{
HouseInfo[House][hExitx] = 2467.4951;
HouseInfo[House][hExity] = -1698.4037;
HouseInfo[House][hExitz] = 1013.5078;
HouseInfo[House][hInt] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 1.");
}
case 2:
{
HouseInfo[House][hExitx] = 318.564971;
HouseInfo[House][hExity] = 1118.209960;
HouseInfo[House][hExitz] = 1083.882812;
HouseInfo[House][hInt] = 5;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 2.");
}
case 3:
{
HouseInfo[House][hExitx] = 2324.419921;
HouseInfo[House][hExity] = -1145.568359;
HouseInfo[House][hExitz] = 1050.710083;
HouseInfo[House][hInt] = 12;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 3.");
}
case 4:
{
HouseInfo[House][hExitx] = 235.508994;
HouseInfo[House][hExity] = 1189.169897;
HouseInfo[House][hExitz] = 1080.339966;
HouseInfo[House][hInt] = 3;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 4.");
}
case 5:
{
HouseInfo[House][hExitx] = 225.756989;
HouseInfo[House][hExity] = 1240.000000;
HouseInfo[House][hExitz] = 1082.149902;
HouseInfo[House][hInt] = 2;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 5.");
}
case 6:
{
HouseInfo[House][hExitx] = 223.043991;
HouseInfo[House][hExity] = 1289.259888;
HouseInfo[House][hExitz] = 1082.199951;
HouseInfo[House][hInt] = 1;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 6.");
}
case 7:
{
HouseInfo[House][hExitx] = 225.630997;
HouseInfo[House][hExity] = 1022.479980;
HouseInfo[House][hExitz] = 1084.069946;
HouseInfo[House][hInt] = 7;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 7.");
}
case 8:
{
HouseInfo[House][hExitx] = 328.493988;
HouseInfo[House][hExity] = 1480.589966;
HouseInfo[House][hExitz] = 1084.449951;
HouseInfo[House][hInt] = 15;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 8.");
}
case 9:
{
HouseInfo[House][hExitx] = 234.0843;
HouseInfo[House][hExity] = 1064.6896;
HouseInfo[House][hExitz] = 1084.2108;
HouseInfo[House][hInt] = 6;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 9.");
}
case 10:
{
HouseInfo[House][hExitx] = 260.4075;
HouseInfo[House][hExity] = 1238.6646;
HouseInfo[House][hExitz] = 1084.2578;
HouseInfo[House][hInt] = 9;
SendClientMessage(playerid, COLOR_LIGHTBLUE, "Interior setado para id 10.");
SalvarCasa(House);
}

}
GivePlayerMoney(playerid,-10000);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, " Vocк nгo tem uma casa");
return 1;
}
}
Reply
#3

I'm confused? is this taken out of your script?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)