Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name Clouds Text API
- @inputs
- @outputs
- @persist
- @trigger
- function number holoText(Index,Input:string,Bodygroup){
- local MODELBASE = "models/sprops/misc/alphanum/alphanum_"
- local Symb = table("."="prd.mdl",","="com.mdl","!"="xmark.mdl","?"="qmark.mdl","@"="atsign.mdl","~"="tilde.mdl","#"="pdsign.mdl",
- "$"="dlsign.mdl","%"="pcnt.mdl","^"="crt.mdl","&"="and.mdl","*"="ast.mdl","("="lpar.mdl",")"="rpar.mdl","'"="apost.mdl",
- "["="lbracket.mdl","]"="rbracket.mdl","{"="lcbracket.mdl","}"="rcbracket.mdl","|"="bar.mdl","+"="plu.mdl","-"="min.mdl",
- "_"="underscore.mdl","<"="lessthan.mdl",">"="greaterthan.mdl","="="equal.mdl",":"="colon.mdl",";"="scolon.mdl","\""="quote.mdl",
- "/"="div.mdl")
- Text = Input:explode("")
- holoCreate(Index)
- FLOW = holoEntity(Index)
- holoScale(Index,vec(0,0,0))
- holoCreate(Text:count()+2)
- CENTER = holoEntity(Text:count()+2)
- holoScale(Text:count()+2,vec(0,0,0))
- holoPos(Text:count()+2,FLOW:pos()+vec(10,0,0)*(Text:count()/2))
- CentIndex = Text:count()+2
- for(I=1,Text:count()){
- if(Symb:exists(Text[I,string])){
- holoCreate(Index+I)
- holoPos(Index+I, FLOW:pos()+vec(10,0,0)*I)
- holoModel(Index+I,MODELBASE+Symb[Text[I,string],string])
- }
- elseif(Text[I,string]:upper() == Text[I,string] & Text[I,string]:findRE("%w")){
- holoCreate(Index+I)
- holoPos(Index+I, FLOW:pos()+vec(10,0,0)*I)
- holoModel(Index+I,MODELBASE+Text[I,string]+".mdl")
- }
- elseif(Text[I,string]:upper() != Text[I,string] & Text[I,string]:findRE("%w")){
- holoCreate(Index+I)
- holoPos(Index+I, FLOW:pos()+vec(10,0,0)*I)
- holoModel(Index+I,MODELBASE+"l_"+Text[I,string]+".mdl")
- }
- holoParent(Index+I, CENTER)
- holoMaterial(Index+I, "models/debug/debugwhite")
- holoAng(Index+I,ang(vec(0,180,0)))
- }
- return CentIndex
- }
Advertisement
Add Comment
Please, Sign In to add comment