Archived copy of warcraft-source.com, the Warcraft: Source (WCS) forum (2007–2011), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2008-04-10 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
April 10, 2008, 11:55:18 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Current Official Servers:
#1 - 207.210.236.112:27015 Location US
#2 - 85.190.38.232:27015 Location Amsterdam
| Tick@100 | wcs 0.77 | Mani |
Google  
  Home   Forum   Help Search Login Register   *
Pages: [1]   Go Down
  Print  
This topic has not yet been rated! You have not rated this topic. Select a rating:
Author Topic: Help recieve weapon on spawn, for use with spawn protection  (Read 40 times)
cobaltflux
Level 2 Apprentice
**
Offline Offline

United States United States

Posts: 41



« on: March 16, 2008, 12:02:07 AM »

I got a server with respawn and spawn protection. I'm looking for a skill that on round start/first player_spawn you receive an mp5, but if you die during the round, and respawn, you receive your guns after the 15 second spawn protection.

Any way that on spawn, it checks to see if its your second time spawning in the round, and if that is true, delay the weapon giving for the duration of spawn protection? Thanks for the help.
Logged
bonbon
Level 0 Beginner

Offline Offline

Canada Canada

Posts: 7




bonbon367
« Reply #1 on: March 16, 2008, 05:33:21 AM »

yeps0rz there is0rz

Code
GeSHi (python):
import gamethread, es, playerlib
 
player_dead_round = {}
 
def player_death(event_var):
   global player_dead_round
   player_dead_round[event_var['userid']] = 1
 
def player_spawn(event_var):
   userid = event_var['userid']
   if player_dead_round.has_key(userid):
       if player_dead_round[userid] == 0:
            es.server.queuecmd('es_xgive %s weapon_mp5navy'%userid)
       else:
             gamethread.delayed(15, es.server.queuecmd, 'es_xgive %s weapon_mp5navy'%userid)
 
def round_start(event_var):
   global player_dead_round
   for userid in playerlib.getUseridList('#all'):
        player_dead_round[userid] = 0
 
def player_disconnect(event_var):
   global player_dead_round
   userid = event_var['userid']
   if player_dead_round.has_key(userid):
       del player_dead_round[userid]

it's up to you to incorperate that into a skill, that is, if you ARE coding a race if not shame on you
« Last Edit: March 16, 2008, 05:39:29 PM by bonbon » Logged
Jeff
WCS ESP Dev Team
Level 7 Expert

Online Online

United States United States

Posts: 295



WWW
beastrace91
« Reply #2 on: March 16, 2008, 08:53:24 AM »

What about players that join and then spawn after the round starts?

~J3ff
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 08:23:54 PM
not really power, there are bad people and there are people who are killing other people, and there are people who are destroying other people.
Today at 05:07:31 PM
Who's happy ? ^^
Today at 04:45:28 PM
Yea, well be happy that there is still some people whom behave like me... without... the world would be a boring(better) place.... wich sucks...
Today at 02:43:59 PM
i'm not serious, i'm just pointing how do you behave (always)
Today at 10:16:51 AM
all im doing is keeping an uppy attitude... im trying to look a bit positive at this... you arez teh ones always being negative... yo uguys shouldnt be so F*kin Serious...
April 09, 2008, 08:11:39 PM
thats not positive feedback at all, it is just making that guy more frustrated
April 09, 2008, 04:52:39 PM
you mean "postive feedback"?
Recent
by Jeff
[Today at 11:50:15 PM]

[Today at 10:48:04 PM]

by Jeff
[Today at 08:55:56 PM]

by Jeff
[Today at 08:48:07 PM]

[Today at 08:10:58 PM]

[Today at 07:21:15 PM]

by Jeff
[Today at 06:24:17 PM]

[Today at 05:37:32 PM]

[Today at 05:27:50 PM]

[Today at 05:24:58 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.064 seconds with 24 queries.