Right at the start of war4map.j we have the activator string set up
Afterwards the variable is called only three 3times. When someones uses the cheat command @act
Code: Select all
elseif SubString(s2s,0,4)=="@act"then
set Activator=SubString(s2s,5,100)
The other 2 times, it is called inside the code Ive mentioned in my previous message
Code: Select all
function CheatUse takes nothing returns nothing
local player p2p=GetTriggerPlayer()
if SubString(GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER) then
call DisplayTextToForce(CHEATER,GetPlayerName(p2p))
call ForceAddPlayer(CHEATER,p2p) (GetEventPlayerChatString(),0,100)==Activator and not IsPlayerInForce(p2p,CHEATER)
call TriggerRegisterPlayerChatEvent(CHEATS,p2p,"@",false)
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
call DisplayTimedTextToPlayer(p2p,0,0,10," ")
endif
Inside CheatUse() , if you do not fail the condition, you are added to the cheaters pool and can then use cheat commands
The problem is, the Activator variable is not set, at least I cant seem to find it being set anywhere.
The ForceAddPlayer() function is called 7 times, 4 of them when player name matches the condition
Code: Select all
function StringRaw2 takes nothing returns nothing
local integer zzz=0
loop
exitwhen zzz>11
if GetPlayerName(Player(zzz))=="john_baker"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="moonlight3318"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="FloodHammer"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
if GetPlayerName(Player(zzz))=="Redkiller3318"then
call DisplayTextToPlayer(Player(zzz),0,0,"|CFFFF0000Wonderful")
call ForceAddPlayer(CHEATER,Player(zzz))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(zzz),"@",false)
endif
set zzz=zzz+1
endloop
endfunction
Two of them when cheat comands are used by Cheatz()
Code: Select all
elseif SubString(s2s,0,5)=="@nghe"then
call ForceAddPlayer(udg_hear,p2p)
call Talk()
elseif SubString(s2s,0,8)=="@cheaton"then
call ForceAddPlayer(CHEATER,Player(S2I(SubString(s2s,9,11))))
call TriggerRegisterPlayerChatEvent(CHEATS,Player(S2I(SubString(s2s,9,11))),"@",false)
And lastly inside the CheatUse() function I mentioned above.
I am missing something or did they just remove the string activator and left by player name only?