Quote:
trigger gg_trg_Str=null
function Trig_Str_Actions takes nothing returns nothing
call SetHeroStr( GetTriggerUnit(), S2I(SubStringBJ(GetEventPlayerChatString(), 5, 20)), true )
endfunction
function InitTrig_Str takes nothing returns nothing
set gg_trg_Str = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_Str, Player(0), "-str", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Str, Player(1), "-str", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Str, Player(2), "-str", true )
call TriggerRegisterPlayerChatEvent( gg_trg_Str, Player(3), "-str", true )
call TriggerAddAction( gg_trg_Str, function Trig_Str_Actions )
endfunction
call InitTrig_Str()
i adopted this code from the -gold code(which works fine) but somehow i cant get this to work.
I change the red text into "GetEnumUnit" but still..desnt work
Is there anything to do with the red text..? or my code just wrong..? can somebody correct my code..?
Thx..
_________________
The tallest tower.. begins from the ground
Today, you are novice..
Tomorrow, you might be The Master..
And when you are..
Vosszaa will hunt you down..