Auryn Posted August 30, 2012 Posted August 30, 2012 (edited) Could someone tell me, or help me about thinking how I could make the word "player(s)" be in plural if there is more 1 player in the room, and stay singular if there is only one, instead of a permanent, ugly "player(s)" ? OnInit: do { delwaitingroom; waitingroom "PvP [" +getmapusers("pvp_n_8-5") +" player(s)]",0,"PvP Warp::OnStart",1; enablewaitingroomevent; sleep 1000; } while(1); end; } This is a "Waiting Room" in my PvP Warper script. Edited August 30, 2012 by Auryn Quote
Euphy Posted August 30, 2012 Posted August 30, 2012 set .@n, getmapusers("pvp_n_8-5"); waitingroom "PvP [" +.@n +" player"+((.@n==1)?"":"s")+"]",0,"PvP Warp::OnStart",1; ref: Tips_and_Tricks_(Scripting)#Compact_IF_Statement 2 Quote
Auryn Posted August 31, 2012 Author Posted August 31, 2012 (edited) Ok, thank you Euphy, this is what I was looking for. Edited August 31, 2012 by Auryn Quote
Question
Auryn
Could someone tell me, or help me about thinking how I could make the word "player(s)" be in plural if there is more 1 player in the room, and stay singular if there is only one, instead of a permanent, ugly "player(s)" ?
This is a "Waiting Room" in my PvP Warper script.
Edited by Auryn2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.