PDA

View Full Version : Testing other player's strings


Brady2
07-05-2001, 01:36 PM
-Jadis, Brady is letting me use his account to post...

Ok I know you can do

for (i=0;i<playerscount;i++) if (strequals(#a(this.i),blah)) ;


But can you check other player's #s strings? If not this would be -------very-------- nice stefan please add it in 2.05 if not already featured.

Dont give me crap about triggeraction or setting it to a server.string because that is not useful in my script.

grim_squeaker_x
07-05-2001, 03:16 PM
You can check them with the with stuff, but that's NPC Server only.

Brady2
07-05-2001, 11:10 PM
-Posted by Jadis

*twitch* How would I do it with the NPCServer?


if (timeout) {
for (this.i=0;this.i<playerscount;this.i++)
with (getplayer(#a(this.i))) if (strtofloat(#s(blah))==0) ;


Would it be something like that?
Never done NPC Server before

grim_squeaker_x
07-05-2001, 11:15 PM
Hmm...
if (initialized||timeout) {
for (i=0;i<playerscount;i++) {
with (players[i]) {
if (strequals(#s(client.blahblah),blah)) {
dostuff;
}
else {
dootherstuff;
}
}
}
timeout=0.05;
}
Is what you would use I think.

Er1c
07-06-2001, 05:45 AM
Can't use a .05 timeout with a server side script, change the timeout to .1 or higher and it will work.

Brady2
07-06-2001, 05:59 AM
-Posted by Jadis

Thanks Kaimetsu and Lady Midnight.

grim_squeaker_x
07-06-2001, 02:56 PM
Originally posted by Er1c
Can't use a .05 timeout with a server side script, change the timeout to .1 or higher and it will work. Yes I know, I'm just used to typing the .05 for a timeout.