#Prop to holo export "pagani" on the 14th of January, 2015

#Put this chunk inside some place like if(first()) where it runs only once
@persist P2HI P2HOI P2HC P2HScale P2HBase:entity P2HTable:table
P2HC = 1
P2HTI = 0
P2HOI = 0
P2HBase = entity() #Change to whatever entity you wish
P2HScale = 1 #Change to whatever scale you'd like your export to be in
#Model, Material, Skin, Color, Position, and Angle (both position and angle are relative to base)
P2HTable[1, array] = array("models/tiggomods/vehicles/paganizonda.mdl", "", 0, vec4(255,255,255,255), vec(-34.5999,-30.776,-4.0673), ang(0.0878,43.3745,0.3624))

#Put this in a place that runs on an interval (i.e interval, runOnTick, timers, etc.)
if(P2HI < P2HC)
{
    while(perf() & holoCanCreate() & P2HI < P2HC)
    {
        P2HI++
        local TA = P2HTable[P2HI, array]
        local TI = P2HI + P2HOI

        holoCreate(TI, P2HBase:toWorld(TA[5, vector] * P2HScale), vec(P2HScale), P2HBase:toWorld(TA[6, angle] * P2HScale))
        holoModel(TI, TA[1, string])
        holoMaterial(TI, TA[2, string])
        holoSkin(TI, TA[3, number])
        holoColor(TI, TA[4, vector4])
        holoParent(TI, P2HBase)
    }
}

#[
General tips:
-If you wanna make a group of holograms to change their material and/or colors all together,...
make your props you want to group a certain material and then you can put in the while loop to...
add the holo index (TI) to an array if the material is such and print out the array once all the...
holos are generated, and then you can use that to your liking

-If you want to use multiple prop to holo exports in 1 e2, which is the reason I had redesigned...
this e2, use the find menu's replace tab to replace "P2H" with "P2H<1, 2, 3, etc.>"...
without the < and >, of course, and then copy the exoprt over
]#
