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-12-06 (original capture). Home · Forum · All archived topics · Downloads
Warcraft-Source.com - WCS mod for CSS
December 06, 2008, 12:13:07 PM *
Welcome, Guest. Please login or register.
Login with username, password and session length
News: Races and Items added into Download section from our great Race Coders!
Such as HOLLIDAY|NovaKiller|Stinkyfax|Frodo|TeacherCreature|Phat_Wizard
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: Weapon Variable  (Read 116 times)
porkie
Level 0 Beginner

Offline Offline

United States United States

Posts: 9




andyhivnguyen
silpharian
« on: April 04, 2008, 02:03:40 PM »

I'm having a problem with one of my skills
Code
GeSHi (eventscripts):
"skill1_setting" "es_xset wcs_chance 70|es_xset wcs_chance 75|es_xset wcs_chance 80|es_xset wcs_chance 100"
   "racealias_chkweap" "es_xif (event_var(weapon) = awp) then racealias_awpdam;es_xif (event_var(weapon) = scout) then racealias_sctdam;es_xif (event_var(weapon) = deagle) then racealias_deadam;es_xif (event_var(weapon) = fiveseven) then racealias_57dam"
   "racealias_awpdam" "es wcs_dealdamage event_var(attacker) event_var(userid) 1500"
   "racealias_sctdam" "es wcs_dealdamage event_var(attacker) event_var(userid) 1200"
   "racealias_deadam" "es wcs_dealdamage event_var(attacker) event_var(userid) 500"
   "racealias_57dam"  "es wcs_dealdamage event_var(attacker) event_var(userid) 200"
   "skill1_cmd" "if (server_var(wcs_dice) <= server_var(wcs_chance) then racealias_chkweap"
   "skill1_sfx" "0"
I want to have each gun have a different damage but when i test it it says "Error: (insert weapon name) is not a variable. Can i get some as to how to code this up?
Logged
kryptonite
<WCS coder>
Administrator
Level 7 Expert
*****
Offline Offline

Germany Germany

Posts: 1113



WWW
sp0nk

myServer 85.190.38.232:27015
(Warning: click connects through Steam)
« Reply #1 on: April 04, 2008, 03:50:12 PM »

yes, you forgot an "es"

Code
GeSHi (eventscripts):
es_xif (event_var(weapon) = awp) then
->
Code
GeSHi (eventscripts):
es es_xif (event_var(weapon) = awp) then
or even better
Code
GeSHi (eventscripts):
if (event_var(weapon) = awp) then
change that for every if(weapon = ....) in your command line (4 times)
Logged

(click to show/hide)
porkie
Level 0 Beginner

Offline Offline

United States United States

Posts: 9




andyhivnguyen
silpharian
« Reply #2 on: April 04, 2008, 10:07:52 PM »

Alright thanks that helped.
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Last 7 Shouts:
December 04, 2008, 09:57:56 PM
gg
December 04, 2008, 09:46:16 PM
hey guys, how are you?
gonna sleep, cya tomorrow
December 03, 2008, 12:45:48 PM
@ bombkill : all mods should be compatible with WCS... but we can't be sure
@retrokboy : css server? provider? other mods?
December 03, 2008, 01:49:25 AM
I NEED SERVER HELP MY FORUM IS IN BUG REPORT PLEASE REPLY I NEED HALP
December 02, 2008, 10:05:01 PM
does anyone know where all the wcs compatible mods are listed or a website i can find them
December 02, 2008, 08:24:47 PM
/agree
Recent
[Today at 09:15:37 AM]

[Today at 08:33:01 AM]

[Today at 12:26:04 AM]

[December 05, 2008, 10:26:03 PM]

[December 05, 2008, 08:10:32 PM]

[December 05, 2008, 07:51:01 PM]

[December 05, 2008, 07:33:12 PM]

[December 05, 2008, 07:11:25 PM]

[December 05, 2008, 06:44:09 PM]

[December 05, 2008, 12:14:07 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.092 seconds with 25 queries.