wc3edit.net

United Warcraft 3 map hacking!
It is currently March 29th, 2024, 1:35 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Chat trigger.. need help
PostPosted: April 6th, 2007, 4:03 am 
Offline
Newcomer
User avatar

Joined: April 4th, 2007, 6:24 pm
Posts: 21
I want to display message that doesn't contain "-"in it.. how could i do that...

i have this.. please help me

Code:
function Trig_Enter_Conditions takes nothing returns boolean
    if ( not ( SubStringBJ(GetEventPlayerChatString(), 1, 1) != "-" ) ) then
        return false
    endif
    return true
endfunction

function Trig_Enter_Actions takes nothing returns nothing
    call DisplayTextToForce( GetPlayersAll(), ( GetPlayerName(GetTriggerPlayer()) + ( ":" + GetEventPlayerChatString() ) ) )
endfunction

//===========================================================================
function InitTrig_Enter takes nothing returns nothing
    set gg_trg_Enter = CreateTrigger(  )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(0), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(1), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(2), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(3), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(4), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(5), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(6), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(7), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(8), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(9), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(10), "", false )
    call TriggerRegisterPlayerChatEvent( gg_trg_Enter, Player(11), "", false )
    call TriggerAddCondition( gg_trg_Enter, Condition( function Trig_Enter_Conditions ) )
    call TriggerAddAction( gg_trg_Enter, function Trig_Enter_Actions )
endfunction


Top
 Profile  
 
 Post subject:
PostPosted: April 6th, 2007, 4:34 am 
Offline
Forum Staff
User avatar

Joined: January 28th, 2007, 8:10 pm
Posts: 830
Location: Canada
Title: JASS Programmer
Why would you want that? So people can use "-" commands without other players reading chat messages?


Top
 Profile  
 
 Post subject:
PostPosted: April 6th, 2007, 5:25 am 
Offline
Newcomer
User avatar

Joined: April 4th, 2007, 6:24 pm
Posts: 21
yes... i already totally eliminated all chat messages that flashes on screen.. by editing the war3mapskin.txt and now i want to show any message "DisplayTextToForce" that doesn't contain any "-"


Top
 Profile  
 
 Post subject:
PostPosted: April 6th, 2007, 6:11 am 
Offline
Newcomer
User avatar

Joined: April 4th, 2007, 6:24 pm
Posts: 21
how about removing last entered chat string??


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

phpBB SEO


Privacy Policy Statement
Impressum (German)