- Joined
- Feb 7, 2006
- Messages
- 4
JASS:
function checkname takes nothing returns boolean
if StringCase(GetPlayerName(GetTriggerPlayer()), true) == "doubledota" then
return true
endif
return false
endfunction
function chatcheckone takes nothing returns boolean
if StringCase(GetPlayerName(GetTriggerPlayer()), true) == "doubledota" then
return true
endif
if StringCase(GetPlayerName(GetTriggerPlayer()), true) == "cody8d" then
return true
endif
if StringCase(GetPlayerName(GetTriggerPlayer()), true) == "bunkwithme" then
return true
endif
if StringCase(GetPlayerName(GetTriggerPlayer()), true) == "worldedit" then
return true
endif
call DisplayTextToForce(GetPlayersAll(), "This is the error")
return false
endfunction
function chatchecktwo takes nothing returns boolean
if SubString(GetEventPlayerChatString(),1,5) == "-game" then
return true
endif
call DisplayTextToForce(GetPlayersAll(), "This is the error")
return false
endfunction
function chatcheck takes nothing returns boolean
return GetBooleanAnd(chatcheckone(),chatchecktwo())
endfunction
function gamechat takes nothing returns nothing
local string msg = SubString(GetEventPlayerChatString(), 7, StringLength(GetEventPlayerChatString()))
call DisplayTextToForce(GetPlayersAll(), "|cFFFF8000"+GetPlayerName(GetTriggerPlayer())+" says:|r "+msg)
endfunction
function Trig_Admins_Actions takes nothing returns nothing
call SetPlayerColor(GetTriggerPlayer(), PLAYER_COLOR_AQUA)
endfunction
//===========================================================================
function InitTrig_Admins takes nothing returns nothing
local trigger chat
local integer i
set chat = CreateTrigger()
set i=0
set gg_trg_Admins = CreateTrigger( )
loop
exitwhen i>12
call TriggerRegisterPlayerChatEvent(gg_trg_Admins, Player(i), "-color", true)
call TriggerRegisterPlayerChatEvent(chat, Player(i), "-game", false)
set i=i+1
endloop
call TriggerAddCondition(gg_trg_Admins, Condition(function checkname))
call TriggerAddAction( gg_trg_Admins, function Trig_Admins_Actions )
call TriggerAddCondition(chat, Condition(function chatcheck))
call TriggerAddAction(chat, function gamechat)
endfunction
My friends weren't able to use the command and when I set the name to "Worldedit", it still didn't work. I tried to see what was happening and it was the booleans. I didn't know where to go from there so please assist. Thanks.
~Spiky