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 2009-10-03 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
October 03, 2009, 11:24:44 AM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Join the new Facebook Warcraft-Source.com Group! It has been currently opened!
Join!
Google  
  Home   Forum   Help Search Login Register   *
Pages: 1 [2]   Go Down
  Print  
Author Topic: Restrict respawn  (Read 180 times)
Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #15 on: June 10, 2009, 08:48:33 AM »

almost i though more about set a key to 1 on spawn for everyone and then check if it is 1 spawn then decrease it to 0 and then next time if they buy it its 0 so they cant respawn
Logged

maze
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 232





myServer 80.252.104.91:26015
(Warning: click connects through Steam)
« Reply #16 on: June 10, 2009, 10:21:19 AM »

i dont know...

next try:


  i would have to put this into es_wcs.txt
  es_xset wcs_respawnx 0
 
  i would have to put this into es_wcs.txt: "event round_start"
  es_xset wcs_respawnx 1

 i would have to add this to the original respawn thing in es_WCSshop_db.txt
Code:
  "cmdbuy"      "if (es_keygetvalue respawnx = 1) then es_xdelayed 2 est_spawn event_var(userid);if (es_keygetvalue respawnx = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawnx 0"
  "cmdactivate" "es_keygetvalue wcs_respawnx WCSuserdata event_var(userid) respawn;if (server_var(wcs_respawnx) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 0;if (server_var(wcs_respawnx) = 1) then es_xdelayed 5 est_spawn event_var(userid);wcs_getlanguage wcs_lng wcs_lng_s_respawna;if (server_var(wcs_respawnx) = 1) then es_xdelayed 4.5 es_xtell event_var(userid) #multi server_var(wcs_lng)"





original code:
Code:
  "respawn"
  {
  "name"        "wcs_lng_s_respawn"
  "description" "wcs_lng_s_respawnd"
  "category"    "3"
  "cost"        "3000"
  "level"       "0"
  "dab"         "2"
  "duration"    "1"
  "maxamount"   "1"
  "itemconfig"  "player_death"
  "cmdbuy"      "if (event_var(es_userdead) = 1) then es_xdelayed 2 est_spawn event_var(userid);if (event_var(es_userdead) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 0;if (event_var(es_userdead) = 0) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 1"
  "cmdactivate" "es_keygetvalue wcs_respawn WCSuserdata event_var(userid) respawn;if (server_var(wcs_respawn) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 0;if (server_var(wcs_respawn) = 1) then es_xdelayed 5 est_spawn event_var(userid);wcs_getlanguage wcs_lng wcs_lng_s_respawna;if (server_var(wcs_respawn) = 1) then es_xdelayed 4.5 es_xtell event_var(userid) #multi server_var(wcs_lng)"
  }

there is still the problem that he just has to check if one of those es_keygetvalue is true

oh man...this is like a frensh text to me.^^
« Last Edit: June 10, 2009, 10:25:47 AM by maze » Logged

Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #17 on: June 10, 2009, 11:00:35 AM »

i said use keyvalues that varible will not work since its just 1 variable and not for a userid
Logged

maze
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 232





myServer 80.252.104.91:26015
(Warning: click connects through Steam)
« Reply #18 on: June 10, 2009, 01:15:30 PM »

event round_start:
es_keygroupcreate respawnamount
es_keysetvalue respawnamount 1



"cmdbuy"        "es_keygetvalue respawnamount WCSuserdata server_var(wcs_userid);es es_xif keygetvalue respawnamount = 1 then proceed (i dont know how
                                                                                                                                                       to add the original part with like an "and")

"cmdactivate"  "....if (server_var(wcs_respawn) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawnamount 0"
Logged

Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #19 on: June 10, 2009, 02:09:41 PM »

you barely now how to code properly Tongue

event in wcs.txt
Code:
event player_spawn
{
es_keysetvalue WCSuserdata event_var(userid) respawn_amount 1
}

Code:
"respawn"
  {
  "name"        "wcs_lng_s_respawn"
  "description" "wcs_lng_s_respawnd"
  "category"    "3"
  "cost"        "3000"
  "level"       "0"
  "dab"         "2"
  "duration"    "1"
  "maxamount"   "1"
  "itemconfig"  "player_death"
  "cmdbuy"        "es_xset respawn_amount 0;es_keygetvalue respawn_amount WCSuserdata event_var(userid) respawn_amount;if(server_var(respawn_amount) = 1) then shopalias_resp1;if(server_var(respawn_amount) = 0) then shopalias_resp"                                                                                                                                     
  "shopalias_resp0""es_tell event_var(userid) #multi #greenYou already respawned once and you cannot do it again. Money refunded!;es est_CashAdd event_var(userid) 3000"
  "shopalias_resp1""if (event_var(es_userdead) = 1) then es_xdelayed 2 est_spawn event_var(userid);if (event_var(es_userdead) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 0;if (event_var(es_userdead) = 0) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 1"
  "cmdactivate" "es_keygetvalue wcs_respawn WCSuserdata event_var(userid) respawn;if (server_var(wcs_respawn) = 1) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 0;if (server_var(wcs_respawn) = 1) then es_xdelayed 5 est_spawn event_var(userid);wcs_getlanguage wcs_lng wcs_lng_s_respawna;if (server_var(wcs_respawn) = 1) then es_xdelayed 4.5 es_xtell event_var(userid) #multi server_var(wcs_lng)"
  }

test this please
Logged

maze
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 232





myServer 80.252.104.91:26015
(Warning: click connects through Steam)
« Reply #20 on: June 10, 2009, 02:54:00 PM »

Quote
you barely now how to code properly
oh you are so damn right. Tongue

this was my first try of coding ever. and it took me like the whole day to do this crapy code....
well, it sounded so easy when you said "learn it".^^

Thanks maxxi for the finnished code and for the bit of knowlege which i have gained. Cheesy

i didnt know there is something like shopalias. i was looking every where for a solution but have only found them in races. and they where using racealias.

"es_xset respawn_amount 0" what does this do?   

anyways, i am gonna test it later, have to go now.
 Grin
Logged

Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #21 on: June 10, 2009, 03:38:35 PM »

its sets the variable to 0 before you write the keyvalue to it Tongue
Logged

maze
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 232





myServer 80.252.104.91:26015
(Warning: click connects through Steam)
« Reply #22 on: June 10, 2009, 08:34:01 PM »

mhh... really dont wanna say this...  Undecided
...but it doesnt work...
you are still able to respawn as often as you want.

Logged

maze
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 232





myServer 80.252.104.91:26015
(Warning: click connects through Steam)
« Reply #23 on: June 11, 2009, 07:55:35 AM »

what about you Jigsaw?

did you test it?
maybe its just me and my server...



anyway i am going to get this going, when i have a lil more time on the weekend.



another try would be this:

delete this from cmdbuy and add this to the event round_end
if (event_var(es_userdead) = 0) then es_xkeysetvalue WCSuserdata event_var(userid) respawn 1

if this works there would be even less respawning.
means:
you play and die ---> first round you cant respawn;
you play and die again---> you can respawn, if you do and dont die that round you wont be able to respawn nextround


i belive this is a way wich would work but this is not what we wanted in the beginning.
that is why maxxis code will work someday Grin



 
Logged

Maxxi
Level 7 Expert
*****
Offline Offline

Netherlands Netherlands

Posts: 1452



WWW
16maxpayne16

myServer 84.243.214.217:27015
(Warning: click connects through Steam)
« Reply #24 on: June 11, 2009, 08:28:47 AM »

ive got no steam on my home pc cause im to lazy to reinstall it so i can't test it for you or else i would Tongue
Logged

Pages: 1 [2]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
Today at 08:57:40 AM
stop spamming...
Today at 07:57:23 AM
October 02, 2009, 08:45:24 PM
October 02, 2009, 08:24:30 PM
Zawmbee Huh
Steam please ?
October 02, 2009, 07:51:43 PM
i agree with zawmbee..it's annoin
October 02, 2009, 07:10:13 PM
Recent
[Today at 11:24:40 AM]

[Today at 10:27:47 AM]

[Today at 07:26:08 AM]

by Narb
[Today at 06:34:50 AM]

[October 02, 2009, 10:25:17 PM]

[October 02, 2009, 09:19:29 PM]

by Skan
[October 02, 2009, 07:09:17 PM]

[October 02, 2009, 06:23:04 PM]

[October 02, 2009, 05:49:33 PM]

[October 02, 2009, 05:19:48 PM]
Theme switch

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.116 seconds with 25 queries.