Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: Bolt on October 17, 2008, 06:27:15 am
-
Anyways, here's my idea:
The script disables all but one weapon in order of appearance on the menu.
(Developed for survival mode, preferably. I played it in R/S and it was great)
For example,
/say Current Round: Desert Eagles (automatically said by the script)
*disables all weapons before round start and enables the deagles*
*NEW ROUND START*
/say Next Round: HK MP5 (automatically said by script too)
At the end of the round all weapons are cleared up (If possible, didn't that /ro ID..ID command do that?
/say Current Round: HK MP5
*disables all weapons before round start and enables the HK*
*NEW ROUND START*
/say Next Round: AK-74
At the end of the round all weapons are cleared up (If possible, didn't that /ro ID..ID command do that?
So it would go in this order:
Deagles (No secondary weapons or grenades)
HK MP5 (No secondary weapons or grenades)
AK-74 (No secondary weapons or grenades)
Steyr AUG (No secondary weapons or grenades)
Spas (No secondary weapons or grenades)
Ruger (No secondary weapons or grenades)
M79 (No secondary weapons or grenades)
Barrett (No secondary weapons or grenades)
Minimi (No secondary weapons or grenades)
Minigun (No secondary weapons or grenades)
Ussocom (No primary weapons or grenades)
Combat Knife (No primary weapons or grenades)
Chainsaw (No primary weapons or grenades)
LAW (No primary weapons or grenades)
Fists (No primary weapons, secondary weapons or grenades)
Grenades (No primary weapons or secondary weapons)
*Back to top of list*
There must be a way to allow grenades for that one grenade round alone, right?
Now the admin commands... Probably all we need is a /on and /off command...
I played this for a few hours on a R/S server with complete strangers and they loved it, they said it should be made into a script so I've come here for help. Please help, it's too good of a game idea to just be dropped.
-
Forcing weapon is better than disabling/enabling clearing dropped etc.
Cool idea.
[edit]
Random rounds will be better :)
[edit2]
I'm going to make it.
-
you cant really stop people grabbing grenades with out turning them off altogether unfortunately you cant take peoples grenades away through script
does sound like a good idea though ill make a small script for it
-
Would be easier to do if there was some kind of procedure in the script core for rounds in survival mode.
-
you cant really stop people grabbing grenades with out turning them off altogether unfortunately you cant take peoples grenades away through script
you can remove all the nadespawns in the mapfile, set maxnades to 1 and spawn a nadebox at players if needed.
-
here i didnt fully test it but it should work fine
Const
Randomise = False;//If true each gun change is random if false it moves through each gun in order
DisabledGuns = '11 12 13';
//note that each gun whos number is less then 10 MUST have a 0 in front for example 04, 07, 02
Var
RoundType: Byte;
Function RandomGun(): Byte;
Var
Randomness: Byte;
C: String;
Begin
Repeat
Randomness:=Random(1, 16);
If (Randomness >= 0) And (Randomness <= 9) Then C:='0'+IntToStr(Randomness) Else C:=IntToStr(Randomness);
If RegExpMatch(C, DisabledGuns) Then Randomness:= RoundType;
Until Randomness <> RoundType
Result:=Randomness;
End;
Procedure ActivateServer();
Begin
If Randomise = False Then RoundType:=1 Else RoundType:=RandomGun();
WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933);
End;
Procedure OnMapChange(NewMap: String);
Var
A: String;
Done: Boolean;
Begin
If Randomise = True Then RoundType:=RandomGun() Else Begin
If RoundType < 16 Then Begin
Done:=False;
Repeat
RoundType:=RoundType+1;
If RoundType >= 16 Then RoundType:=1;
If (RoundType >= 0) And (RoundType <= 9) Then A:='0'+IntToStr(RoundType) Else A:=IntToStr(RoundType);
If Not RegExpMatch(A, DisabledGuns) Then Done:=True;
Until Done = True
End Else RoundType:=1;
WriteConsole(0, 'Next Round Is '+WeaponNameByNum(RoundType), $FF9933);
End;
End;
Procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
Begin
If (PrimaryNum <> RoundType) And (PrimaryNum <> 255) Then ForceWeapon(ID, RoundType, 255, 0);
End;
Edit: ill add this to soldat central later so you can just download the files instead ill of course give you full credit Bolt
Edit2: Recognized that on a non random change it will still change to a disabled gun now fixed and change how it reads disabled guns
Heres the link to it http://www.soldatcentral.com/index.php?page=script&f=59
-
Looks pretty awesome what you have there. Any chance you could add the /on, /off commands?
And maybe you could have a /random on/off command, that way it can be either style.
Also, remove the nade round, it would be better to remove nades completely.
Thanks a lot for making this, I'm definitely going to use this if it functions right, when you add those I'll get it set up at a friends server :]
-
yeah ill work in some admin commands for you also i was thinking of adding something to auto change weapons every minute or so when its on
-
That may be a good alternative for non-survival use, however it wouldn't affect me as I'd only use it in R/S so if you want to make the one minute script, that can be your little side project :]
-
i added it as an option
TimedChange = True;
if thats true every minute it will change to a new gun
ive uploaded the new script and added 2 admin commands
/script turns the script on and off
/random turns random gun selection on and off
-
The server commands don't work and it only forces deagles.
Maybe your round identification stuff ain't working and it always thinks it's the first round?
-
works for me :? when the round changes its meant to move to next round what server type are you using windows or linux because i tested this on a windows based server
Edit: there is only one problem that ive seen thats with Randomize:=True it doesnt tell you the next round type but still randomly changes
Edit2: you might need to download it again it sounds like your using the older version that i hadnt added the commands into OR you need to use /adminlog either one
-
It had the commands and I downloaded it from SoldatCentral.
-
hmmm it works perfect for me
i use /script it turns the script on/off i use /random it turns random on/off
btw i did update the upload when i fixed it to have these commands so you might have downloaded the older version try downloading it and trying again
-
Primary weapon is weapon that you hold, or weapon that is from 1-10 ?
I'm making my own version ;D
-
primary weapon is the weapon your holding can be 0 to 16 if i remember right (socom is 0 right?) and same thing with secondary weapon
btw fist is 255
-
Thx, that will reduce my script. I think fist is 17-255.
-
Good progress on the script, RT, it's nearly finished :D
-
Zakath is hosting my actual beta version.
inc2.sytes.net 63073
I will make it public when i'm sure there's no bugs ;)
-
Wow, Gizd, that's awesome! Only problem I got was that I got a violation error during the grenade round and had to shut down Soldat. When I went to re-enter I was banned from the server, that could be bad :P
Could you add /random on/off and /cycle on/off commands, random making the weapon choice random/in-order and cycle being the entire script activator/deactivator.
And maybe you could change what sets the round or not? I'm not sure whether that's a prototype for something that identifies the amount of players on the team or something else, but I'd really prefer for it to change weapons at the end of the round, once the server kills everyone.
And, RT, your version is awesome. If you can fix the two weapon problem and fix the server messages it'd be almost complete :]
And Gizd, I love what you did with the comments of the weapons, expecially the special weapons like Flame and the bows. That should definitely be in the script.
And well done sorting out the grenades. Very nice :D
-
Thx, that will reduce my script. I think fist is 17-255.
fist is 17 to 255 but when you are unarmed the server considers it number 255
-
When i do on/off Bombski will be able to add this mod on his servers :D
-
yeah ive unfortunately been busy lately so i might not be able to fully finish my version >_> but best of luck to you gizd
-
When som1 solve my problem with knifes (atm topic below) it will be ready.
-
When i do on/off Bombski will be able to add this mod on his servers :D
u dont have to do that. bombski's multimode server uses my script called scriptsmanager which turn off and on scripts on mapchange... (:
-
u dont have to do that. bombski's multimode server uses my script called scriptsmanager which turn off and on scripts on mapchange... (:
So you have to add EndRound(0) in OnMapChange and everything should work fine.
-
u dont have to do that. bombski's multimode server uses my script called scriptsmanager which turn off and on scripts on mapchange... (:
So you have to add EndRound(0) in OnMapChange and everything should work fine.
dont do anything, just the actuall script
i know cos i scripted something for bombski's multimode and i know how it works
dont do any on and off commands
-
HUZZA! ive got some free time today and tomorrow hopefully i can finish my version :P
-
How is it going guys?
-
Mine is ready, but i need some ppl to test it.