@name Admin Chip
@inputs 
@outputs 
@persist FreezeProps:array P:entity
@trigger all

if (first()) {
runOnChat(1)
P = owner()
}

if (chatClk(P))
{
    FirstW=P:lastSaid():explode(" ")[1,string]:lower()
    SecondW=P:lastSaid():explode(" ")[2,string]:lower()
    if (FirstW == "/clear") {
    holoDeleteAll()
        for (I=1,FreezeProps:count()) {
            Temp = FreezeProps[I,entity]
            Temp:propDelete()
            FreezeProps:remove(I)
        }
    }
    TPlayer = findPlayerByName(SecondW)
    if (TPlayer:isPlayer()) {
        if (FirstW == "/slap") {
            Temp = propSpawn("models/props_phx/misc/potato_launcher_explosive.mdl",TPlayer:shootPos(),1)
            Temp:propBreak()
        }
        if (FirstW == "/kill") {
            Temp = propSpawn("models/props_phx/amraam.mdl",TPlayer:shootPos(),1)
            Temp:propBreak()
        }
        if (FirstW == "/freeze") {
            Temp = propSpawn("models/items/ar2_grenade.mdl",TPlayer:pos(),1)
            FreezeProps:pushEntity(Temp)
        }
        if (FirstW == "/blind") {
            holoCreate(1)
            holoPos(1, TPlayer:shootPos())
            holoScale(1, vec(-8,8,8))
            holoColor(1, vec(255,255,255))
            holoMaterial(1,"models/debug/debugwhite")
            holoParent(1,TPlayer)
            holoModel(1,"hq_sphere")
            holoShadow(1,0)
        }
        
    }
    
}
