08:44:50 (_KaszpiR_) bigballer, still having problem with getting the player target from say command?
08:45:11 (SniperBot) ([OD]-BigBaller) yea
08:45:13 (SniperBot) ([OD]-BigBaller) i posted on forums
08:45:16 (SniperBot) ([OD]-BigBaller) scripting forum
08:45:20 (SniperBot) ([OD]-BigBaller) take a look at the code if you want
08:45:22 (SniperBot) ([OD]-BigBaller) ill brb
08:46:02 (_KaszpiR_) i got no idea about cmd_target()
08:46:04 (_KaszpiR_)
08:47:26 (_KaszpiR_) as i said try registering "say" and not "say /msg"
08:47:40 (_KaszpiR_) cause probably it will return all the time the /msg as an argument
08:47:46 (_KaszpiR_) withut anything later
08:47:52 (SniperBot) ([OD]-BigBaller) mm
08:48:04 (SniperBot) ([OD]-BigBaller) well if I registered say
08:48:08 (SniperBot) ([OD]-BigBaller) in game chat
08:48:15 (_KaszpiR_) it parsed any line
08:48:16 (SniperBot) ([OD]-BigBaller) how would they wispher?
08:48
0 (SniperBot) ([OD]-BigBaller) i would have ot make a new function then right?
08:48
7 (_KaszpiR_) you gotta detect the lines taht starts with /msg statement and then parse them, otherwise
plugin-continue
08:48:44 (SniperBot) ([OD]-BigBaller) ahh
08:49:00 (SniperBot) ([OD]-BigBaller) soo yea i would have to make a new function for /msg
08:49:02 (SniperBot) ([OD]-BigBaller) as I thought
08:49:03 (SniperBot) ([OD]-BigBaller) haha
08:50:09 (_KaszpiR_) see this
http://info.wsisiz.edu.pl/~sochon/do...mysql_playtime
.sma
08:50:27 (_KaszpiR_) there is a function called public playtime_say(id){
08:50
6 (SniperBot) ([OD]-BigBaller) yea devicenull said something about playtim
08:50
8 (SniperBot) ([OD]-BigBaller) haha
08:51:43 (_KaszpiR_) the plugin checks any say or say_team for following begins
08:51:45 # Unknown command: PLAYTIME
08:51:51 (_KaszpiR_) /playtimetop
08:51:53 (_KaszpiR_) /playtime
08:52:11 (_KaszpiR_) and that function just detects the say commands
08:52:29 (_KaszpiR_) other command is parsing the console command
08:52:42 (_KaszpiR_) but both of them are finally exporting cvars to another function
08:52:55 (SniperBot) ([OD]-BigBaller) if(equal(speech,"/playtimetop", 12))
08:52:56 (SniperBot) ([OD]-BigBaller) playtime_report(id,"",1)
08:52:56 (SniperBot) ([OD]-BigBaller) else if(equal(speech,"/playtime", 9))
08:52:56 (SniperBot) ([OD]-BigBaller) {
08:52:59 (SniperBot) ([OD]-BigBaller) right there heh?
08:53:03 (_KaszpiR_) in your case the query will contain "name message"
08:53:04 (_KaszpiR_) yea
08:53
0 (_KaszpiR_) and you gotta use equal(speech,"/msg", 4)
08:53:40 (SniperBot) ([OD]-BigBaller) why 4 ?
08:53:45 (SniperBot) ([OD]-BigBaller) j/w
08:53:52 (_KaszpiR_) cause "/msg" is 4 chars
08:53:53 (_KaszpiR_)
08:54:19 (_KaszpiR_) the equal function works in a way how many chars to complare
08:54:27 (_KaszpiR_) actually "/msg" contains 5 chars
08:54
7 (SniperBot) ([OD]-BigBaller) ahh
08:54:45 (_KaszpiR_) bbut last one is a string ending that can be omitted
08:54:59 (SniperBot) ([OD]-BigBaller) soo it would be equal(speech,"/msg",5)
08:55:03 (SniperBot) ([OD]-BigBaller) or 4
08:55:05 (SniperBot) ([OD]-BigBaller) like you said?
08:55:08 (_KaszpiR_) use 4
08:55:10 (SniperBot) ([OD]-BigBaller) ok
08:55:28 (_KaszpiR_) then you gonna detect all lines containing /msg on the beginning
08:55:40 (_KaszpiR_) but if the someone will use say /msg john hello
08:55:42 (_KaszpiR_) it will work
08:55:43 (_KaszpiR_) but
08:55:54 (_KaszpiR_) say /msg johny hello
08:56:01 (_KaszpiR_) probably not (i gotta test it)
08:56:10 (_KaszpiR_) thats because of the aditional space
08:56
4 (_KaszpiR_) actually the query later should be splitted on parts with detection of the space
08:56:45 (_KaszpiR_) there is a string function that can hep in achieveing that
08:57:18 (_KaszpiR_) you gotta split query into 2 parts
08:57
2 (_KaszpiR_) to split the target name form rest of the message
08:57:46 (_KaszpiR_) i have not seen any other privmsg addon, maybe someone allready did that
08:58:18 (SniperBot) ([OD]-BigBaller) ok
08:58:21 (SniperBot) ([OD]-BigBaller) soo basically
08:58:28 (SniperBot) ([OD]-BigBaller) i take the pmsg code
08:58
0 (SniperBot) ([OD]-BigBaller) i already have
08:58
3 (SniperBot) ([OD]-BigBaller) copy it
08:58
8 (SniperBot) ([OD]-BigBaller) to use it for the say commands
08:58:45 (SniperBot) ([OD]-BigBaller) and use plugin_continue
08:58:50 (SniperBot) ([OD]-BigBaller) soo I can also use console?
08:58:53 (SniperBot) ([OD]-BigBaller) something like that?
08:58:55 (_KaszpiR_) then you would search for player id between players dependin gon the nick check (there is allready
implemented func for that)
08:59:03 (_KaszpiR_) yea
08:59:10 (_KaszpiR_) well
08:59
9 (_KaszpiR_) when you press a "say" bind key it will in fact act as if you would print in the console "say
message_here"
09:00:48 (SniperBot) ([OD]-BigBaller) yea
09:01:29 (SniperBot) ([OD]-BigBaller) ok
09:01
3 (SniperBot) ([OD]-BigBaller) im going to do a rough test
__________________