Hi all
Well, I hope some of U, scripters, still remember and use ESA made by Raindeer, loong time ago.
I need some help with it. I spent a few days trying to solve these problems so please don't tell me that I didn't try or sth like that.
1st, easier - how does $read_file() work? I tried to use some of below, but none of them works.
$if($isequal(%text%,!file),
$send(/say File:)
$read_file(C:\Soldat\esadata\vsrx.txt)
$read_file(vsrx.txt)
$read_file(vsrx)
,)
-----------------
2nd
I'd like to have something like "CWMode". When its ON it would kick spec who doesnt speak on teamchat but in public, disturbing players.
So it has to discover if msg starts with ^, if player is spec and if cwmode is on.
$if($isequal(%line%,/cwmode on),$sset(cwmode,1),)
$if($isequal(%line%,/cwmode off),$sset(cwmode,0),)
Above works
$if($and($isnotequal(%cwmode%,0),$isequal(%player%sid%team%,TM_SPEC),$isnotequal($substr(%text%,1,1),^)),
$send(/kick $redo(%player%sid%id%))
,)
Above doesn't. When I turn CWMode on and say anything on spec i get something like this:
/kick 1 (83.5.64.180)
02:02:59 [KE] Mighty `Ce is admin and cannot be kicked.
02:03:00 /kick 1
02:03:00 [KE] Mighty `Ce is admin and cannot be kicked.
02:03:00 /kick 1
02:03:00 [KE] Mighty `Ce is admin and cannot be kicked.
02:03:01 /kick 1
02:03:01 [KE] Mighty `Ce is admin and cannot be kicked.
02:03:01 /kick 1
02:03:01 [KE] Mighty `Ce is admin and cannot be kicked.
...
...
But the problem is I don't have an idea how to make this script work just ONCE for each message sent from spec. Now it works all the time till i disconnect ESA, change team or use /cwmode off...
-----------------------------
Problems:
1. How does $read_file work
2. How to make ESA "see" if spec talk on teamchat or not (with this script it doesn't)
3. How to make it work once for each sentence said by spec
Cheers,
Mighty