- Joined
- Nov 16, 2012
- Messages
- 663
Hello guys ! I really really need the Trigger Version of this Jass :
JASS:
function echo takes string s returns nothing
call DisplayTextToPlayer(GetLocalPlayer(),0,0,s)
endfunction
function h2i takes handle h returns integer
return h
return 0
endfunction
function code2i takes code h returns integer
return h
return 0
endfunction
function s2i takes string h returns integer
return h
return 0
endfunction
function i2code takes integer h returns code
return h
return null
endfunction
function i2u takes integer h returns unit
return h
return null
endfunction
function i2ta takes integer h returns triggeraction
return h
return null
endfunction
function i2tc takes integer h returns triggercondition
return h
return null
endfunction
function i2trg takes integer h returns trigger
return h
return null
endfunction
function i2pc takes integer h returns playercolor
return h
return null
endfunction
function i2timer takes integer h returns timer
return h
return null
endfunction
function i2tt takes integer h returns texttag
return h
return null
endfunction
function MBSetItemStyleBR takes multiboard mb,integer col,integer row,boolean showValue,boolean showIcon returns nothing
call MultiboardSetItemStyle(MultiboardGetItem(mb,row-1,col-1),showValue,showIcon)
endfunction
function MBSetItemValueBR takes multiboard mb,integer col,integer row,string Val returns nothing
call MultiboardSetItemValue(MultiboardGetItem(mb,row-1,col-1),Val)
endfunction
function MBSetItemColorBR takes multiboard mb,integer col,integer row,integer r,integer g,integer b,integer alpha returns nothing
call MultiboardSetItemValueColor(MultiboardGetItem(mb,row-1,col-1),r,g,b,255-alpha)
endfunction
function MBSetItemWidthBR takes multiboard mb, integer col, integer row, real width returns nothing
call MultiboardSetItemWidth(MultiboardGetItem(mb,row-1,col-1),width/100)
endfunction
function MBSetItemIconBR takes multiboard mb, integer col, integer row,string icon returns nothing
call MultiboardSetItemIcon(MultiboardGetItem(mb,row-1,col-1),icon)
endfunction
function GetStringCutBR takes integer CutLength,integer Sl,integer offset,string s returns integer
local integer c=offset+CutLength
if SubString(s,c-1,c)!=" " then
loop
exitwhen SubString(s,c-1,c)==" " or c>=Sl
set c=c+1
endloop
endif
return c
endfunction
function InitPlayersColors takes nothing returns nothing
//###RED
call StoreInteger(udg_cc,"0","ColorRed",255)
call StoreInteger(udg_cc,"0","ColorGreen",3)
call StoreInteger(udg_cc,"0","ColorBlue",3)
//###BLUE
call StoreInteger(udg_cc,"1","ColorRed",0)
call StoreInteger(udg_cc,"1","ColorGreen",66)
call StoreInteger(udg_cc,"1","ColorBlue",255)
//###TEAL
call StoreInteger(udg_cc,"2","ColorRed",28)
call StoreInteger(udg_cc,"2","ColorGreen",230)
call StoreInteger(udg_cc,"2","ColorBlue",185)
//###PURPLE
call StoreInteger(udg_cc,"3","ColorRed",84)
call StoreInteger(udg_cc,"3","ColorGreen",0)
call StoreInteger(udg_cc,"3","ColorBlue",129)
//###YELLOW
call StoreInteger(udg_cc,"4","ColorRed",255)
call StoreInteger(udg_cc,"4","ColorGreen",252)
call StoreInteger(udg_cc,"4","ColorBlue",1)
//###ORANGE
call StoreInteger(udg_cc,"5","ColorRed",254)
call StoreInteger(udg_cc,"5","ColorGreen",138)
call StoreInteger(udg_cc,"5","ColorBlue",14)
//###GREEN
call StoreInteger(udg_cc,"6","ColorRed",32)
call StoreInteger(udg_cc,"6","ColorGreen",192)
call StoreInteger(udg_cc,"6","ColorBlue",0)
//###PINK
call StoreInteger(udg_cc,"7","ColorRed",229)
call StoreInteger(udg_cc,"7","ColorGreen",91)
call StoreInteger(udg_cc,"7","ColorBlue",176)
//###GRAY
call StoreInteger(udg_cc,"8","ColorRed",149)
call StoreInteger(udg_cc,"8","ColorGreen",150)
call StoreInteger(udg_cc,"8","ColorBlue",151)
//###LIGHTBLUE
call StoreInteger(udg_cc,"9","ColorRed",126)
call StoreInteger(udg_cc,"9","ColorGreen",191)
call StoreInteger(udg_cc,"9","ColorBlue",241)
//###DARKGREEN
call StoreInteger(udg_cc,"10","ColorRed",16)
call StoreInteger(udg_cc,"10","ColorGreen",98)
call StoreInteger(udg_cc,"10","ColorBlue",70)
//###BROWN
call StoreInteger(udg_cc,"11","ColorRed",78)
call StoreInteger(udg_cc,"11","ColorGreen",42)
call StoreInteger(udg_cc,"11","ColorBlue",4)
//###BLACK
call StoreInteger(udg_cc,"12","ColorRed",40)
call StoreInteger(udg_cc,"12","ColorGreen",40)
call StoreInteger(udg_cc,"12","ColorBlue",40)
call StoreInteger(udg_cc,"13","ColorRed",40)
call StoreInteger(udg_cc,"13","ColorGreen",40)
call StoreInteger(udg_cc,"13","ColorBlue",40)
call StoreInteger(udg_cc,"14","ColorRed",40)
call StoreInteger(udg_cc,"14","ColorGreen",40)
call StoreInteger(udg_cc,"14","ColorBlue",40)
call StoreInteger(udg_cc,"15","ColorRed",40)
call StoreInteger(udg_cc,"15","ColorGreen",40)
call StoreInteger(udg_cc,"15","ColorBlue",40)
endfunction
function GetColorBR takes player p,integer color returns integer
if color==1 then
set color=GetStoredInteger(udg_cc,I2S(h2i(GetPlayerColor(p))),"ColorRed")
elseif color==2 then
set color=GetStoredInteger(udg_cc,I2S(h2i(GetPlayerColor(p))),"ColorGreen")
elseif color==3 then
set color=GetStoredInteger(udg_cc,I2S(h2i(GetPlayerColor(p))),"ColorBlue")
endif
return color
endfunction
function InitTrig_ChatStuff takes nothing returns nothing
endfunction
JASS:
function InitTokenSize takes string token,real size returns nothing
set udg_tokenlng[s2i(token)]=size
endfunction
function InitImg takes string replaced,string iconpath returns nothing
set udg_smiles[s2i(replaced)]=iconpath
endfunction
function GetTS takes string token returns real
if udg_tokenlng[s2i(token)]==0 then
return 0.65
else
return udg_tokenlng[s2i(token)]
endif
endfunction
function TcChatInit takes nothing returns nothing
local integer i=0
set udg_cc=InitGameCache("TcsChat.w3v")
call FlushGameCache(udg_cc)
set udg_cc=InitGameCache("TcsChat.w3v")
//##############################################################
// Custom Colors
set udg_Sr[0]=255
set udg_Sg[0]=255
set udg_Sb[0]=255
set udg_Sr[1]=245
set udg_Sg[1]=45
set udg_Sb[1]=45
set udg_Sr[2]=45
set udg_Sg[2]=45
set udg_Sb[2]=245
set udg_Sr[3]=28
set udg_Sg[3]=230
set udg_Sb[3]=185
set udg_Sr[4]=84
set udg_Sg[4]=0
set udg_Sb[4]=129
set udg_Sr[5]=254
set udg_Sg[5]=138
set udg_Sb[5]=14
set udg_Sr[6]=32
set udg_Sg[6]=200
set udg_Sb[6]=0
set udg_Sr[7]=149
set udg_Sg[7]=150
set udg_Sb[7]=151
set udg_Sr[8]=126
set udg_Sg[8]=191
set udg_Sb[8]=241
set udg_Sr[9]=16
set udg_Sg[9]=98
set udg_Sb[9]=70
//##############################################################
call InitTokenSize(" ",0.38)
call InitTokenSize("!",0.15)
call InitTokenSize("\"",0.28)
call InitTokenSize("#",0.61)
call InitTokenSize("$",0.61)
call InitTokenSize("%",0.85)
call InitTokenSize("^",0.53)
call InitTokenSize("&",0.65)
call InitTokenSize("'",0.12)
call InitTokenSize("*",0.42)
call InitTokenSize("(",0.37)
call InitTokenSize(")",0.37)
call InitTokenSize("+",0.51)
call InitTokenSize("-",0.35)
call InitTokenSize(",",0.12)
call InitTokenSize(".",0.12)
call InitTokenSize("/",0.28)
call InitTokenSize("0",0.52)
call InitTokenSize("1",0.42)
call InitTokenSize("2",0.52)
call InitTokenSize("3",0.52)
call InitTokenSize("4",0.52)
call InitTokenSize("5",0.52)
call InitTokenSize("6",0.52)
call InitTokenSize("7",0.52)
call InitTokenSize("8",0.52)
call InitTokenSize("9",0.52)
call InitTokenSize(":",0.12)
call InitTokenSize(";",0.12)
call InitTokenSize("<",0.55)
call InitTokenSize(">",0.55)
call InitTokenSize("=",0.55)
call InitTokenSize("?",0.45)
call InitTokenSize("@",0.95)
call InitTokenSize("A",0.8)
call InitTokenSize("B",0.7)
call InitTokenSize("C",0.7)
call InitTokenSize("D",0.72)
call InitTokenSize("E",0.7)
call InitTokenSize("F",0.67)
call InitTokenSize("G",0.75)
call InitTokenSize("H",0.75)
call InitTokenSize("I",0.25)
call InitTokenSize("J",0.45)
call InitTokenSize("K",0.71)
call InitTokenSize("L",0.62)
call InitTokenSize("M",0.95)
call InitTokenSize("N",0.7)
call InitTokenSize("O",0.75)
call InitTokenSize("P",0.7)
call InitTokenSize("Q",0.76)
call InitTokenSize("R",0.74)
call InitTokenSize("S",0.68)
call InitTokenSize("T",0.72)
call InitTokenSize("U",0.72)
call InitTokenSize("V",0.75)
call InitTokenSize("W",1)
call InitTokenSize("X",0.72)
call InitTokenSize("Y",0.73)
call InitTokenSize("Z",0.75)
call InitTokenSize("[",0.25)
call InitTokenSize("]",0.25)
call InitTokenSize("_",0.6)
call InitTokenSize("`",0.35)
call InitTokenSize("~",0.55)
call InitTokenSize("{",0.35)
call InitTokenSize("}",0.35)
call InitTokenSize("|",0.15)
call InitTokenSize("a",0.53)
call InitTokenSize("b",0.53)
call InitTokenSize("c",0.47)
call InitTokenSize("d",0.53)
call InitTokenSize("e",0.52)
call InitTokenSize("f",0.35)
call InitTokenSize("g",0.51)
call InitTokenSize("h",0.54)
call InitTokenSize("i",0.3)
call InitTokenSize("j",0.33)
call InitTokenSize("k",0.52)
call InitTokenSize("l",0.32)
call InitTokenSize("m",0.92)
call InitTokenSize("n",0.53)
call InitTokenSize("o",0.53)
call InitTokenSize("p",0.55)
call InitTokenSize("q",0.55)
call InitTokenSize("r",0.48)
call InitTokenSize("s",0.5)
call InitTokenSize("t",0.35)
call InitTokenSize("u",0.53)
call InitTokenSize("v",0.53)
call InitTokenSize("w",0.87)
call InitTokenSize("x",0.54)
call InitTokenSize("y",0.54)
call InitTokenSize("z",0.53)
call InitTokenSize("_",0.6)
call InitTokenSize("_",0.55)
call InitTokenSize("©",0.72)
call InitTokenSize("_",0.8)
call InitTokenSize("_",0.53)
call InitTokenSize("_",1.1)
call InitTokenSize("_",0.8)
call InitTokenSize("_",0.7)
call InitTokenSize("_",0.7)
call InitTokenSize("_",0.64)
call InitTokenSize("_",0.76)
call InitTokenSize("_",0.65)
call InitTokenSize("_",1)
call InitTokenSize("_",0.74)
call InitTokenSize("_",0.78)
call InitTokenSize("_",0.78)
call InitTokenSize("_",0.75)
call InitTokenSize("_",1)
call InitTokenSize("_",0.78)
call InitTokenSize("_",0.9)
call InitTokenSize("_",0.75)
call InitTokenSize("_",0.72)
call InitTokenSize("_",0.78)
call InitTokenSize("_",0.72)
call InitTokenSize("_",0.76)
call InitTokenSize("_",0.85)
call InitTokenSize("_",0.77)
call InitTokenSize("_",0.75)
call InitTokenSize("_",1)
call InitTokenSize("_",1.03)
call InitTokenSize("_",0.9)
call InitTokenSize("_",0.72)
call InitTokenSize("_",1)
call InitTokenSize("_",0.79)
call InitTokenSize("_",0.5)
call InitTokenSize("_",0.57)
call InitTokenSize("_",0.5)
call InitTokenSize("_",0.48)
call InitTokenSize("_",0.54)
call InitTokenSize("_",0.54)
call InitTokenSize("_",0.8)
call InitTokenSize("_",0.55)
call InitTokenSize("_",0.55)
call InitTokenSize("_",0.55)
call InitTokenSize("_",0.52)
call InitTokenSize("_",0.53)
call InitTokenSize("_",0.85)
call InitTokenSize("_",0.54)
call InitTokenSize("_",0.53)
call InitTokenSize("_",0.51)
call InitTokenSize("_",0.55)
call InitTokenSize("_",0.52)
call InitTokenSize("_",0.51)
call InitTokenSize("_",0.63)
call InitTokenSize("_",0.73)
call InitTokenSize("_",0.51)
call InitTokenSize("_",0.51)
call InitTokenSize("_",0.53)
call InitTokenSize("_",0.85)
call InitTokenSize("_",0.85)
call InitTokenSize("_",0.65)
call InitTokenSize("_",0.72)
call InitTokenSize("_",0.52)
call InitTokenSize("_",0.74)
call InitTokenSize("_",0.54)
call InitImg(":)","smiles\\smile.tga")
call InitImg(":(","smiles\\sad.tga")
call InitImg(";)","smiles\\wink.tga")
call InitImg("=)","smiles\\smile.tga")
call InitImg(":d","smiles\\biggrin.tga")
call InitImg("lol","smiles\\lol.tga")
call InitImg(":rofl:","smiles\\lol.tga")
call InitImg("rofl","smiles\\lol.tga")
call InitImg("<_<","smiles\\lookto.tga")
call InitImg("o_o","smiles\\o_O.tga")
call InitImg(":shy:","smiles\\shy.tga")
call InitImg(":tongue:","smiles\\tongue.tga")
call InitImg(":p","smiles\\tongue.tga")
call InitImg(":up:","smiles\\up.tga")
call InitImg(":cool:","smiles\\cool.tga")
call InitImg(":confused:","smiles\\confused.tga")
call InitImg(":hmmm:","smiles\\hmmm.tga")
call InitImg(":rolleyes:","smiles\\rolleyes.tga")
call InitImg(":angry:","smiles\\angry.tga")
call InitImg("dead","smiles\\dead.tga")
call InitImg("death","smiles\\dead.tga")
call InitImg("die","smiles\\dead.tga")
call InitImg("wow","smiles\\wow.tga")
call InitImg("doom","smiles\\doom.tga")
call InitImg("xgm","smiles\\xgm.tga")
call InitImg("toadcop","smiles\\Toadcop.tga")
call InitImg("toad cop","smiles\\Toadcop.tga")
call InitImg("tc","smiles\\Toadcop.tga")
call InitImg("t.c.","smiles\\Toadcop.tga")
call InitImg("rammstein","smiles\\rammstein.tga")
call InitImg("rammy","smiles\\rammstein.tga")
call InitImg("quake","smiles\\q4.tga")
call InitImg(":we:","smiles\\we.tga")
call InitImg("worldeditor","smiles\\we.tga")
call InitImg("world editor","smiles\\we.tga")
call InitImg("fuck","smiles\\warn.tga")
call InitImg("fack","smiles\\warn.tga")
call InitImg("bitch","smiles\\warn.tga")
call InitImg("dick","smiles\\warn.tga")
call InitImg("cunt","smiles\\warn.tga")
call InitImg("ass","smiles\\warn.tga")
call InitImg("shit","smiles\\warn.tga")
call InitImg("idiot","smiles\\warn.tga")
call InitImg("rubbish","smiles\\warn.tga")
call InitImg("sepultura","smiles\\warn.tga")
call InitImg("slipknot","smiles\\warn.tga")
call InitImg("gay","smiles\\warn.tga")
call InitImg("satani","smiles\\warn.tga")
call InitImg("lucif","smiles\\warn.tga")
call InitImg("lick","smiles\\warn.tga")
call InitImg("suck","smiles\\warn.tga")
//##############################################################
call InitPlayersColors()
set udg_Tccs[1]=40 // Total Width
set udg_Tccs[2]=80 // Column count
set udg_Tccs[3]=10 // Row count
set udg_Tccs[4]=8000/udg_Tccs[2] // Max String Lines
set udg_Tccs[5]=12 // Max tag length
set udg_Tccs[6]=2 // Min tag length
call TriggerSleepAction(0)
loop
exitwhen i>11
if GetPlayerController(Player(i))==MAP_CONTROL_USER then
set udg_mbs[i]=CreateMultiboard()
call MultiboardSetColumnCount(udg_mbs[i],udg_Tccs[2])
call MultiboardSetRowCount(udg_mbs[i],udg_Tccs[3])
call MultiboardSetItemStyleBJ(udg_mbs[i],0,0,true,false)
call MultiboardSetItemWidthBJ(udg_mbs[i],0,0,0)
call MultiboardSetTitleText(udg_mbs[i],"|cfffedaacToadcop's Chat")
call MBSetItemWidthBR(udg_mbs[i],1,1,udg_Tccs[1])
call MBSetItemValueBR(udg_mbs[i],1,1,"|cff6677bbThis System is designed by |cfffedaac(|cff8899cc_____.ru|cfffedaac) Toadcop [SRTS] III|cff6677bb for XGM|r")
endif
set i=i+1
endloop
call echo("Enter some chat message !!! also you can use some smiles ;) and don't write bad words ! like f**k, and other... :) And some new feature :) enter -name ... your wished name ! enter -color ... your wished Player Color (0-15) !")
endfunction
//===========================================================================
function InitTrig_ChatInts takes nothing returns nothing
call ExecuteFunc("TcChatInit")
endfunction
JASS:
function GetLineIdBR takes nothing returns integer
set udg_Tccs[100]=udg_Tccs[100]+1
if udg_Tccs[100]>udg_Tccs[4] then
set udg_Tccs[100]=1
endif
return udg_Tccs[100]
endfunction
function ParseChatStringBR takes string s returns integer
local string token=null
local integer sl=StringLength(s)
local integer id=GetLineIdBR()
local integer id2=id*udg_Tccs[2]
local integer i=0
local integer i1=0
local integer i2=0
local integer i3=0
local integer cur=0
local string st=""
local string st2=""
local string st3=""
local boolean b=false
set udg_r=255
set udg_g=255
set udg_b=255
loop
set cur=id2+i1
exitwhen i>sl or i1>udg_Tccs[2]
set i2=udg_Tccs[6]
set b=false
set st2=SubString(s,i,i+1)
if st2=="^" then
set st3=SubString(s,i+1,i+2)
set i3=S2I(st3)
if st3=="0" then
set udg_r=udg_Sr[0]
set udg_g=udg_Sg[0]
set udg_b=udg_Sb[0]
set i=i+2
elseif i3!=0 then
set udg_r=udg_Sr[i3]
set udg_g=udg_Sg[i3]
set udg_b=udg_Sb[i3]
set i=i+2
endif
endif
loop
exitwhen i2>udg_Tccs[5] or b
set st=SubString(s,i,i+i2)
set st=udg_smiles[s2i(StringCase(st,false))]
set b=st!=null and st!=""
if b then
set i=i+i2-1
endif
set i2=i2+1
endloop
if b then
set udg_tokens[cur]=st
set udg_img[cur]=true
else
set udg_tokens[cur]=SubString(s,i,i+1)
set udg_img[cur]=false
endif
set udg_red[cur]=udg_r
set udg_green[cur]=udg_g
set udg_blue[cur]=udg_b
set i1=i1+1
set i=i+1
endloop
set udg_max[id]=i1-1
return id
endfunction
function FillChatBoardBR takes multiboard mb,player p,integer id,integer row returns nothing
local integer i=id*udg_Tccs[2]
local integer cur=1
local integer max=udg_max[id]+i
local integer r=GetColorBR(p,1)
local integer g=GetColorBR(p,2)
local integer b=GetColorBR(p,3)
local string sp=GetPlayerName(p)
local string s=null
local integer lng=StringLength(sp)
loop
exitwhen cur>lng
set s=SubString(sp,cur-1,cur)
call MBSetItemWidthBR(mb,cur,row,GetTS(s))
call MBSetItemStyleBR(mb,cur,row,true,false)
call MBSetItemValueBR(mb,cur,row,s)
call MBSetItemColorBR(mb,cur,row,r,g,b,0)
set cur=cur+1
endloop
set s=":"
call MBSetItemWidthBR(mb,cur,row,GetTS(s))
call MBSetItemStyleBR(mb,cur,row,true,false)
call MBSetItemValueBR(mb,cur,row,s)
call MBSetItemColorBR(mb,cur,row,255,255,255,0)
set cur=cur+1
set s=" "
call MBSetItemWidthBR(mb,cur,row,GetTS(s))
call MBSetItemStyleBR(mb,cur,row,true,false)
call MBSetItemValueBR(mb,cur,row,s)
call MBSetItemColorBR(mb,cur,row,255,255,255,0)
set cur=cur+1
loop
exitwhen i>max or cur>udg_Tccs[2]
if udg_img[i] then
call MBSetItemWidthBR(mb,cur,row,1)
call MBSetItemStyleBR(mb,cur,row,false,true)
call MBSetItemIconBR(mb,cur,row,udg_tokens[i])
else
call MBSetItemWidthBR(mb,cur,row,GetTS(udg_tokens[i]))
call MBSetItemStyleBR(mb,cur,row,true,false)
call MBSetItemValueBR(mb,cur,row,udg_tokens[i])
call MBSetItemColorBR(mb,cur,row,udg_red[i],udg_green[i],udg_blue[i],0)
endif
set cur=cur+1
set i=i+1
endloop
endfunction
function ChatConverter takes nothing returns nothing
local player p=GetTriggerPlayer()
local string s=GetEventPlayerChatString()
local multiboard mb=udg_mbs[GetPlayerId(p)] // make with this what you want...
local integer maxrow=udg_Tccs[3]
local integer i=maxrow
local integer sn=0
local string sp=I2S(GetPlayerId(p))
if SubString(s,0,1)!="-" then
set sn=ParseChatStringBR(s)
if udg_tokens[sn*udg_Tccs[2]]!=null and udg_tokens[sn*udg_Tccs[2]]!="" then
set udg_MsgOrder[1]=sn
set udg_MsgP[udg_MsgOrder[1]]=GetPlayerId(p)
call MultiboardSetItemsStyle(mb,false,false)
call MultiboardSetItemsValue(mb,"")
call MultiboardSetItemsIcon(mb,"")
call MBSetItemWidthBR(mb,1,1,udg_Tccs[1])
call MBSetItemStyleBR(mb,1,1,true,false)
call MBSetItemValueBR(mb,1,1,"|cff6677bbThis System is designed by |cfffedaac(|cff8899cc_____.ru|cfffedaac) Toadcop [SRTS] III|cff6677bb for XGM|r")
loop
exitwhen i<2
set udg_MsgOrder[i]=udg_MsgOrder[i-1]
if udg_tokens[udg_MsgOrder[i]*udg_Tccs[2]]!=null and udg_tokens[udg_MsgOrder[i]*udg_Tccs[2]]!="" then
call FillChatBoardBR(mb,Player(udg_MsgP[udg_MsgOrder[i]]),udg_MsgOrder[i],i)
endif
set i=i-1
endloop
call MultiboardDisplay(mb,true)
endif
else
if SubString(GetEventPlayerChatString(),0,5)=="-name" then
call SetPlayerName(p,SubString(GetEventPlayerChatString(),6,StringLength(GetEventPlayerChatString())))
elseif SubString(GetEventPlayerChatString(),0,6)=="-color" then
call SetPlayerColor(p,i2pc(S2I(SubString(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString())))))
endif
endif
endfunction
//===========================================================================
function InitTrig_ChatConverter takes nothing returns nothing
local integer i=0
set gg_trg_ChatConverter = CreateTrigger()
loop
exitwhen i>11
if GetPlayerController(Player(i))==MAP_CONTROL_USER then
call TriggerRegisterPlayerChatEvent(gg_trg_ChatConverter,Player(i),"",false)
endif
set i=i+1
endloop
call TriggerAddAction(gg_trg_ChatConverter,function ChatConverter)
endfunction