bigblue

Player respawn timer

I'm looking for a script that can prevent a respawned player having the ability to  shoot and kill, throw frags, melee etc during their respawn period, which has been set with spawn_protection enabled. At the moment with spawn_protaction enabled for 3s, a respawned player can't be killed during that 3s duration, but they themselves can still shoot and kill etc.. which makes it all pointless and onesided.

 

Any help appreciated !

Thx

Share this post


Link to post
Share on other sites

Tiddy-bits:

1 hour ago, bigblue said:

I'm looking for a script that can prevent a respawned player having the ability to  shoot and kill, throw frags, melee etc during their respawn period, which has been set with spawn_protection enabled. At the moment with spawn_protaction enabled for 3s, a respawned player can't be killed during that 3s duration, but they themselves can still shoot and kill etc.. which makes it all pointless and onesided.

 

Any help appreciated !

Thx

You can actually do this with events.

event_spawn 'wdel $n 5;w8 3;spawn weap "weapon path here" $n;wadd $n"
 

Then just add more weapon/nade spawns for whatever you want to give the player.

Takka and bigblue like this

Share this post


Link to post
Share on other sites

Many thanks for this :)

 

Can I just add in additional weapons on the same line, or do I need to make separate events to do this ?

 

For example:

event_spawn 'wdel $n 5;w8 3;spawn weap "weapons\shotgun\shotgun" ;spawn weap "weapons\pistol\pistol" $n;wadd $n"

 

Apologies if that's not correct, I'm not too sure how to do this the right way.. also, the '5' (wdel $n 5) in the script - what does that indicate ?

 

One more thing, is it possible to stop a spawn protected player meleeing during the protection period ? (it's not too important, but just wondered if it was possible).

 

Many thanks again.. appreciate the help :)

Share this post


Link to post
Share on other sites

@bigblue No need to apologize! I am new at this too! We all have to start somewhere right? It's totally tricky to get the hang of it, so I understand. 

But yeah you would want to do it all in one line. Something like this

 

event_spawn 'wdel $n 5;w8 3;nades $n 0 1;nades $n 2 2;spawn weap "weapons\shotgun\shotgun" $n;wadd $n;spawn weap "weapons\sniper rifle\sniper rifle" $n;wadd $n;spawn weap "weapons\pistol\pistol" $n;wadd $n'

Basically you can see it as directions and SAPP will do the directions in the order you give them.

wdel = weapon delete
$n = player number

5 = all weapons

So wdel $n 5 means delete all the weapons from the player. So the spawned player won't be able to melee because they have no weapons.

If you haven't already, check out the SAPP manual, it has some of these terms listed.

Takka likes this

Share this post


Link to post
Share on other sites
  • Recently Browsing   0 members

    No registered users viewing this page.