Guest Posted April 20, 2005 Share Posted April 20, 2005 on *:SIGNAL:mta.connect:{ set %test 0 mta.say $1 $mta.ip($1,%test) } for some reason mtama always outputs Unknown when you run this script it only does it on mta.connect with a variable in for the playerid have you seen this before? is there a way around it? i need to know because its pissing me off Link to comment
{SB}Killer Posted April 20, 2005 Share Posted April 20, 2005 Hmm i think since ur already setting a variable %test to 0 it will not work u need to previously define what %test stands for you are setting a variable to 0 and it will not output anything. thats what i think but i dont know me not a scripter Link to comment
Oli Posted April 20, 2005 Share Posted April 20, 2005 $mtra.ip() does not work on mta.connect. This is a known issue. Use a timer to get the ip's on connect. Link to comment
{SB}Killer Posted April 20, 2005 Share Posted April 20, 2005 $mtra.ip() does not work on mta.connect. This is a known issue. Use a timer to get the ip's on connect. ohh so i guess dns lookup doesnt work with mta.connect either right? Link to comment
Harry Posted April 20, 2005 Share Posted April 20, 2005 If you type the IP yourself it will, if you want to read out the IP of a player (i guess you will) you have to use a timer to wait for the value to be loaded Link to comment
MrJax Posted April 20, 2005 Share Posted April 20, 2005 I think he wants to use it on mta.join and got mixed up, why would you want it on connect? Link to comment
Harry Posted April 20, 2005 Share Posted April 20, 2005 If MTA:mA got disconencted and reconnects, other ppl can be on the server. Rechecking on connect is very smart Link to comment
Niels Posted April 20, 2005 Share Posted April 20, 2005 on *:SIGNAL:mta.connect:{ var %a = 0 while (%a <= $mta.maxplayers($1) ) { if ($mta.name($1,%a) != Unknown) { mta.say $1 $mta.ip($1,%a) } !inc %a } } Well working Link to comment
Harry Posted April 20, 2005 Share Posted April 20, 2005 DUH: if ($mta.name($1,%a) != Unknown) { /me slaps Niels for this stupid post. The problem is the Unknown, and by filtering them out, the problem will still exist. Link to comment
Guest Posted April 20, 2005 Share Posted April 20, 2005 what do you mean set a timer? should i set the timer for longer? i tryed doing this but it still returns the Unkown on *:SIGNAL:mta.connect:{ set %test 0 !.timer 1 10 mta.say $1 $mta.ip($1,%test) } Link to comment
Guest Posted April 21, 2005 Share Posted April 21, 2005 dude cant u make alias to be checked at connect like .timer 1 2 checkalias mta.blabla$1- i wonder if that will work Link to comment
MeanpantheR Posted April 21, 2005 Share Posted April 21, 2005 erm, maybe there just isnt an ID one in the server, since your using an alias that gets triggered wen mtama joins Link to comment
MrJax Posted April 21, 2005 Share Posted April 21, 2005 $mta.ip does NOT work on connect, that timer would get the ip straight away (or try to) and then 'say' it in 10 seconds, not wait 10 seconds then get the ip and 'say' it. Link to comment
Oli Posted April 21, 2005 Share Posted April 21, 2005 on *:SIGNAL:mta.connect:!.timer 1 1 mta.ip.announce $1 alias mta.ip.announce { var %a = 0 while (%a <= $mta.maxplayers($1)) { if ($ini($mta.dir $+ $1.ini,ID $+ %a)) mta.log $1 $mta.name($1,%a) $+ : $mta.ip($1,%a) !inc %a } } something like that Link to comment
Recommended Posts