In need of help. if theres anyone left

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
20Twen
Lance Corporal
Posts: 10
Joined: Wed May 23, 2007 12:38 am

In need of help. if theres anyone left

Post by 20Twen »

I have several mods I'd like to implement on a server however I feel underqualified to do it. I'm hoping that someone here if anyone can help me.

My ideas are

Force a no forcemodels cvar to all clients

script a players button that if its held down it will sprint the player at a greater runspeed.

script it so that axis grenades are smoke grenades and allied grenades are frag and when everyone spawns...everyone gets 1 smoke, 3 frag.

My ideas for implementing are as follows....

One script, executed from the dmprecache script, the script includes one world sized trigger and a minimum of three threads perhaps more depending on whats required.

The trigger itself will likely have an origin at 0,0,0 and a setsize of
-16800 -16800 -16800)(16800 16800 16800 so it incompasses everymap.

The threads will be one a piece. One to force the cvar for no forcemodels (I've tried this before but never got it to work)

The second will be something like this

if{local.player = hold "use"}
then(local.player.runspeed = 300}

The third thread would be for the grenades, the script itself would only contain half the work

A parm.other line
If{player is alive, team is team, not spectator, etc}
Then {local.player.nadeready==1}

local.player.nadeready=1
local.player take grenades
local.player give steilhangranateammo 1
local.player give m2grenadeammo 3

if {player is dead, team changed, spectator}
then {local.player.nadeready=0}

Most of the modding for the grenades rests with the tik files. Which is where most of my problem is with the grenades. I cant figure out what tik files I have to change in order to adapt the explosion to be say mushroomcloud.tik or something like that.

I realize that I havent put any real scripting up here, but i havent even begun to script these mods but I know instinctively I'll have trouble because I've been researching for the past hour. I will put the full details of how its done up once its complete, if it ever is. Thank you in advance for any help you might offer.
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

You've got some good ideas - why don't you pick one at a time and post/ focus on it that way - you will get more help.

for starters - maybe you could force nomodels like this, exec a global script after spawn

Code: Select all

main:

while(1)
{$player stufftext "setu cg_forcemodel 0;setu cg_effectdetail 1"
wait 5}

end
20Twen
Lance Corporal
Posts: 10
Joined: Wed May 23, 2007 12:38 am

Post by 20Twen »

Thanks Viper, much appreciated, but if I wanted that command to be inforced every say 15 or 30 seconds I would add

wait 15
gotomain

end

so it would loop? I'm pretty sure of it. Unfortunately I'm unable to test any mods on a server side basis till we make a jump from our current servers to the new ones around Feb 16th. This will be the first thing I test.

Anyone who reads this have any suggestions or info for the grenades?
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

it is in a loop

while(1)
{
//loop
wait 5
}

goto is for a specific method of routing - but not recomended for a simple loop.
Post Reply