how can i move a players ?
thankx fans
how can i move a players ?
thankx fans
Last edited by Old Fox; March 25th, 2019 at 10:13 PM.
It is possible with a specifically designed script.
But you should consider that you would need the user to consent, otherwhise it is violating the users free choise to join a specific server.
This is different from reconnecting or kickig a player.
I am not sure such a script exists, but it is doable, even without the user to download something from server.
If the user would download a menu with a agree dialog that would be the best case to get the consent of the user.
hmmm
Last edited by Old Fox; March 25th, 2019 at 10:14 PM.
Save it as redirect.scr and execute from DMprecache. It's pretty the same method as guys used in force join team thread. Command is:
orCode:rcon redirect idnumber
This is the code to save:Code:ad_rcon redirect idnumber
//=========================================================================
main:{
//=========================================================================
while (1){
local.player_entnum = getcvar("redirect")
if(local.player_entnum != ""){
for (local.i = 1; local.i <= $player.size; local.i++) {
local.player = $player[local.i]
if (local.player.entnum == int(local.player_entnum)){
local.player stufftext("connect 95.97.109.32:12203") //Change it to your ip and port.
}
}
setcvar "redirect" "";
}
waitframe
}
}end
Last edited by Criminal; November 8th, 2018 at 03:08 AM.
thankx DerFuhrer
its running well but there is small prob the cosole spamming very much so can i stop the spamming ?
Yes, that is because setcvar isn't inside the if, as it really should be. Put it in the if just after the for.
I updated code to working one, TY Smithy!
no no guys there something went wrong
Last edited by Old Fox; March 25th, 2019 at 10:15 PM.
Ah, It's because you made short statement so I thought that one way redirect is all you need. Give me all IP numbers with ports of your servers and I will create for you redirecting between all of you servers in both ways. Actually you can even tell if you use that Admin Pro and Jims Punishment to force players to join team you want them to join in the end, because if not I can integrate it into that script. But server will probably auto-team balance players after forcing them to join desired team, It's a lot of work(more than hour) to bypass it.
Last edited by Criminal; November 8th, 2018 at 01:29 AM.
Sorry, just realised that my reply was ambiguous looking at your code. I meant inside the first if but after the for closing bracket (perhaps it would be better placed just before the for, but inside the if?). With it inside the second if, it's still looping over if an admin provides a value that doesn't match a player entnum (but in this case it will constantly loop over players).