Is there any script to replace a space with a underscore ( _ ) ? As some scanner wont scan a player because he has a space in his name.. I know foresight does this, but i dont want to use foresight it gives too much problems
In Spearhead you can't because you cannot access netname via script..you have to use a scanner that do this automatically. Or maybe you can decide to make a script that change player name and use it as a command where you imput player number and the new name. But this will only be manually...so totally useless srry m8 Not sure but in BT I think you can use $player[local.i].netname to get his name and this make this task possible. BUT not sure of this because never used BT If you are having problems with dumpuser rcon command you may think to install Daven's patch that has a new command "dumpclient" followed by slot number. However this is useless if you are having problems with players scanners like AI or others that do not support dumpclient and don't have a automatic replace for " " to "_"
Try with Delator scanner You will not have a problem with that, dumpclient will work and Delator will replace spaces with _ for scanning them. Much better and you will not have those problem with it like with foresight. Just unpack it it's not need to install it start RconDelator.exe make a setup like rconpasss max ping or other and try it. also with ModDelator.exe when you open it you must setup what you want to stopped like cheats than on the end it will create for you In Generated mod folder a file colled zzzzz-delator.pk3 put it on the server and than start scanner. If you need help ask.
Yea LeBabouin You have right Davens patch will do that but most of the providers close exe files for changing and than Davens patch cant be installed. If you have that problem give a try to Delator if not take a Davens patch and don't worry.
If You can't delete moh_spearhead_server.exe file from Your server than you must ask provider to do that for you if they want. When I try with my provider they didn't want to do that for me.
If you don't have acces on it than FTP programs like FileZila or.. will not help You they will stay locked and can't be changed.
Yeah they didnt wanted to give us acces to it as u could upload a .exe with a virus in it so they putted it in tcadmin as update pack and we updated it some days ago.
If you have daven's patch applied and you got your name that you want to convert, then use the attached script and place it in global/ folder. Then simple do: Code: local.newstring = waitthread global/strings.scr::replace local.playername " " "_" local.player stufftext ("set name " + local.newstring) If not, keeping asking your provider, they're probably just scared that whatever you want to do might cause problems you could sue them for or something similar
Thanks Sor will test it now! EDIT: It seems not to work i use this: And the daven fixes i have is: SH Server fixes (09-08-10) Code: main: thread name end name: while(1) { for(local.i=1; local.i<=$player.size; local.i++) { local.newstring = waitthread global/strings.scr::replace local.playername " " "_" local.player stufftext ("set name " + local.newstring) } wait 20 thread name end
You have to obtain the player's name first. I just used 'local.playername' as reference. I think daven made netname work the same way it does in BT..
i trying do this and only big problem with get name from player, i try getcvar name but it take name from server cfgs (not from player cfgs) :/ about scaner Counter Intelligence have change "" to "_".
ehhh now i take name from player but only this "player". Real name is different so it bad work but its more what i make maybe someone add some fix Code: main: thread name end name: //while(1) { for(local.i=1; local.i<=$player.size; local.i++) { level.name = ($player[local.i] + (getcvar(ui_name))) local.fixname = level.name local.newstring = waitexec global/strings.scr::Replace local.fixname " " "_" //local.newstring = waitthread global/strings.scr::replace local.playername " " "_" wait 2 $player[local.i] stufftext ("set name " + local.newstring) //local.player stufftext ("set name " + local.newstring) wait 2 if(local.player == NULL) { $player[local.i] iprint ("Splayer OldNAME: " + local.fixname) 1 //$player[local.i] iprint ("local netname: " + local.netname) 1 //$player[local.i] iprint ("local playername: " + local.playername) 1 $player[local.i] iprint ("local newstring(NEWNAME): " + local.newstring) 1 } } if (local.newstring == NIL) { println "++++++++++++++++++++++ NEW NAME NIL :/ " } //} wait 20 thread name end
Without daven's patch for SH or Reborn patch for AA, you cannot obtain a random player's name. Just your own. All the cvars you check are your own settings.
Hello I fix this problem local.name = waitthread get_player_name local.player Code: get_player_name local.player: if (local.player == NIL || local.player == NULL) { end } if (local.player.netname != NIL) { if (local.player.netname != "") { end local.player.netname } else { end } } end
and Answer for Thread is: local.name = waitthread get_player_name local.player local.string = waitexec global/strings.scr::Replace local.name " " "_" $player stufftext ("name " + local.string)