I have a rifles mod already that does what I want, but on Stalli I want something different. I want sniper only on Stali, but the rest to go back to my rifles mod....So $or or any other smart person, how do I do that?
Weapon mod...its a hard one
Moderator: Moderators
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Weapon mod...its a hard one
Ok, so I don't even come close to knowing how to do this, but here's what I want.
I have a rifles mod already that does what I want, but on Stalli I want something different. I want sniper only on Stali, but the rest to go back to my rifles mod....So $or or any other smart person, how do I do that?
I have a rifles mod already that does what I want, but on Stalli I want something different. I want sniper only on Stali, but the rest to go back to my rifles mod....So $or or any other smart person, how do I do that?
HeavenBound
I'm new at this
I'm new at this
* Sees an opportunity to shamelessly push own mod *
Get squadmaker
http://medalofhonor.filefront.com/file/Squadmaker;69103
It's not difficult to make squad configs for rifle only and sniper only, and you can tell the server to use a particular config for a specific map.
Get squadmaker
http://medalofhonor.filefront.com/file/Squadmaker;69103
It's not difficult to make squad configs for rifle only and sniper only, and you can tell the server to use a particular config for a specific map.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Show what's in that rifle script.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
Code: Select all
if !(getcvar "rifle") {end}
waitframe
waitframe
local.n = randomint 99999
self weaponcommand mainhand targetname ("w" + local.n)
local.weapon = $("w" + local.n).model
self weaponcommand mainhand targetname ""
switch(local.weapon)
{
case "models/weapons/springfield.tik":
case "models/weapons/thompsonsmg.tik":
case "models/weapons/bar.tik":
case "models/weapons/bazooka.tik":
self takeall
self give "models/weapons/kar98.tik"
self give "models/weapons/m2frag_grenade.tik"
self give "models/weapons/colt45.tik"
waitframe
self use "models/weapons/kar98.tik"
break
case "models/weapons/kar98sniper.tik":
case "models/weapons/mp40.tik":
case "models/weapons/mp44.tik":
case "models/weapons/panzerschreck.tik":
self takeall
self give "models/weapons/m1_garand.tik"
self give "models/weapons/steilhandgranate.tik"
self give "models/weapons/p38.tik"
waitframe
self use "models/weapons/m1_garand.tik"
break
}
...
HeavenBound
I'm new at this
I'm new at this
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Keep the script, but change it to:
Now set the "rifle" cvar to 0 and the "sniper" cvar to 1 on that specific map (in that mapscript after prespawn)
Code: Select all
main:
if (self == NULL)
end
waitframe
waitframe
local.n = randomint 99999
self weaponcommand mainhand targetname ("w" + local.n)
local.weapon = $("w" + local.n).model
self weaponcommand mainhand targetname ""
if (getcvar "rifle" == "1")
{
switch(local.weapon)
{
case "models/weapons/springfield.tik":
case "models/weapons/thompsonsmg.tik":
case "models/weapons/bar.tik":
case "models/weapons/bazooka.tik":
self takeall
self give "models/weapons/kar98.tik"
self give "models/weapons/m2frag_grenade.tik"
self give "models/weapons/colt45.tik"
waitframe
self use "models/weapons/kar98.tik"
break
case "models/weapons/kar98sniper.tik":
case "models/weapons/mp40.tik":
case "models/weapons/mp44.tik":
case "models/weapons/panzerschreck.tik":
self takeall
self give "models/weapons/m1_garand.tik"
self give "models/weapons/steilhandgranate.tik"
self give "models/weapons/p38.tik"
waitframe
self use "models/weapons/m1_garand.tik"
break
}
}
else if ( (getcvar "sniper") == "1")
{
case "models/weapons/springfield.tik":
case "models/weapons/thompsonsmg.tik":
case "models/weapons/bar.tik":
case "models/weapons/bazooka.tik":
self takeall
self give "models/weapons/KAR98sniper.tik"
self give "models/weapons/m2frag_grenade.tik"
self give "models/weapons/colt45.tik"
waitframe
self use "models/weapons/KAR98sniper.tik"
break
case "models/weapons/kar98sniper.tik":
case "models/weapons/mp40.tik":
case "models/weapons/mp44.tik":
case "models/weapons/panzerschreck.tik":
self takeall
self give "models/weapons/springfield.tik"
self give "models/weapons/steilhandgranate.tik"
self give "models/weapons/p38.tik"
waitframe
self use "models/weapons/springfield.tik"
break
}
}
endOur official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Why in the world would you add it to the mapscript??
Of couse it won't work, scripts unload when there are 2 duplicate labels.
I told you to replace the rifle.scr with this new script (keep the name) and put this after waittill spawn/prespawn on the map you want snipers instead of rifles:

I told you to replace the rifle.scr with this new script (keep the name) and put this after waittill spawn/prespawn on the map you want snipers instead of rifles:
Code: Select all
setcvar "rifle" "0"
setcvar "sniper" "1"Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
oh, i read it wrong....
but how in the world would i do it automatically?
I mean, its rifles only the whole time, but 1 map. Can i do that w/ mefy's ext gametype in my cfg? ex.:
I know that won't work, but how can I do it automatically? lol
but how in the world would i do it automatically?
I mean, its rifles only the whole time, but 1 map. Can i do that w/ mefy's ext gametype in my cfg? ex.:
Code: Select all
set g_extgametype_mohdm2 ft set rifle 1
set g_extgametype_mohdm6 ffa set sniper 1
set g_extgametype_mohdm3 ft set rifle 1
set g_extgametype_mohdm1 ffa set rifle 1
set g_extgametype_mohdm7 ft set rifle 1
HeavenBound
I'm new at this
I'm new at this
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
Automatically? Well I just told you twice (3 times now); add these 2 lines after prespawn in stalingrad's mapscript:
Code: Select all
setcvar "rifle" "0"
setcvar "sniper" "1"Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
HeavenBound
- Colour Sergeant
- Posts: 85
- Joined: Thu Sep 11, 2008 12:55 am
-
SilentAngel
- Captain
- Posts: 239
- Joined: Wed Mar 12, 2008 8:27 pm
I'm not sure to have understood very well...
Why don't ya seply run a script from your maps, where you set the weapons..or make your own script to be exec from dmprechace that exploit the map cvar and select different mods dipending on it...
should be easyer in my opinion then use other peopple mods..if you're not the maker(almost for me), it's hard to use a mod with all his functions...
Why don't ya seply run a script from your maps, where you set the weapons..or make your own script to be exec from dmprechace that exploit the map cvar and select different mods dipending on it...
should be easyer in my opinion then use other peopple mods..if you're not the maker(almost for me), it's hard to use a mod with all his functions...
-
$oldier Of Ra
- Lieutenant Colonel
- Posts: 404
- Joined: Sun Oct 16, 2005 7:16 pm
- Location: Belgium
- Contact:
That's why I never use someone else's scripts.
Our official website: http://www.mohaairborne.co.cc
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
(Still accessible through http://mohaaclantb.tk and http://users.skynet.be/mohaaclantb/)
For all your bot needs!!!!
$oldier Of Ra.
