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


Messages In This Thread
Adding Interior To Houses - by dillo1000 - 06.01.2016, 22:29
Re: Adding Interior To Houses - by rodrigo147 - 07.01.2016, 14:19
Re: Adding Interior To Houses - by dillo1000 - 07.01.2016, 16:22

Forum Jump:


Users browsing this thread: 1 Guest(s)