February 17, 2020, 03:42:10 PM

Author Topic: Re: How do i say if event_var(userid) is #c then <command> ?  (Read 2553 times)

c6464

  • Guest
es_xif event_var(userid) ==#c then do racealias_command; es_xif event_var(userid) == #ct then do racealias_command

But I'm not sure, but I think its right

Offline NovaKiller

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 783
  • Loves WCS. Loves to make races. Loves to play WCS
    • |UbEr MiCrO ReVoLuTiOn|UMR|
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #1 on: July 05, 2007, 02:56:29 PM »
I think this is better. Cause it search for you and what team you are on: 2=T 3=CT. And i mean the commands for the teams is: Terrorist = #T and Counter-Terrorist = #CT. I dont know if #C also can be used. Anyway i use this.
Terrorist:
Code: [Select]
es es_xif (server_var(wcs_team) = 2) then <command>

Counter-Terrorist:
Code: [Select]
es es_xif (server_var(wcs_team) = 3) then <command>

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #2 on: July 05, 2007, 05:06:59 PM »
wcs_team is not a command !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

es_getplayerteam wcs_team
es_getplayerteam fuckknowsinwhatteamheis event_var(userid)

(es es_x)if server_var(fuckknowsinwhatteamheis) = 2 then command #c (#c works, #ct works.. As well, same as #a works, and #all works as well...) // note that this is team T

(es es_x)if server_var(fuckknowsinwhatteamheis) = 3 then #t/#c // this is CT

1: spectator
2: T
3: CT
Care.

Offline SkiLLz

  • Level 6 Experienced
  • *****
  • Posts: 148
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #3 on: July 05, 2007, 05:18:20 PM »
if(event_var(es_userteam) == 2) then es_whatever
if(event_var(es_attackerteam) == 2)  then es_whatever

Offline Koshy

  • Level 7 Expert
  • *****
  • Posts: 569
  • Country: 00
    • Lethal Reflex
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #4 on: July 06, 2007, 05:42:45 AM »
Damn, I did it again.

Offline NovaKiller

  • <WCS coder>
  • Level 7 Expert
  • *****
  • Posts: 783
  • Loves WCS. Loves to make races. Loves to play WCS
    • |UbEr MiCrO ReVoLuTiOn|UMR|
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #5 on: July 06, 2007, 08:21:22 AM »
OK. I just use #CT anyway. I think its better for me to use that. :P

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #6 on: July 06, 2007, 09:49:07 AM »
#c!d I thought, like krypto did in his ultimates

#t!d, basically it just says:

Target T _NOT_ the dead ( ! means not)
Care.

Offline HOLLIDAY

  • <Race Maker>
  • Watchdog
  • Level 7 Expert
  • *****
  • Posts: 2851
  • Country: 00
  • of all the things ive lost i miss my mind the most
    • HOLLIDAYWCS.COM
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #7 on: July 06, 2007, 01:03:59 PM »
thats it   !   i was useing #cid  and #tid    !i!i!i!i!i!  lol
« Last Edit: July 06, 2007, 01:07:17 PM by HOLLIDAY »

Offline Real_Wolf

  • Level 7 Expert
  • *****
  • Posts: 639
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #8 on: July 07, 2007, 02:33:01 AM »
lol, i.... um.... idiot? Is that what it stands for :D
=|[K|T]|= Real Wolf


Offline Koshy

  • Level 7 Expert
  • *****
  • Posts: 569
  • Country: 00
    • Lethal Reflex
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #9 on: July 07, 2007, 11:37:43 AM »
Damn, I did it again.

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #10 on: July 07, 2007, 11:47:12 AM »
#c!a?
Care.

Offline Koshy

  • Level 7 Expert
  • *****
  • Posts: 569
  • Country: 00
    • Lethal Reflex
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #11 on: July 07, 2007, 12:15:31 PM »
Damn, I did it again.

Offline Fast.Food

  • Level 7 Expert
  • *****
  • Posts: 401
    • http://wcs.despo-clan.de
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #12 on: July 07, 2007, 12:47:26 PM »
sorry, its #c!l //the last letter is an L.



Usual syntax: est_Set* <identifier> [value]
Identifiers list:
#a - all players on server
#c - all counter-terrorists
#t - all terrorists
#s - all spectators
#u - all unassigned
#h - all human players
#b - all bots
#l - all living players
#d - all dead players
You can add as many selections at once as you wish, you can also remove all of a selection by putting a '!' before the letter.
For Example to get all CT's that are alive you can do #c!d or all spectators and unassigned players that are not bot's, #su!b
name/part of username
steamid
userid
Care.

Offline Koshy

  • Level 7 Expert
  • *****
  • Posts: 569
  • Country: 00
    • Lethal Reflex
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #13 on: July 07, 2007, 08:41:01 PM »
Damn, I did it again.

Offline Real_Wolf

  • Level 7 Expert
  • *****
  • Posts: 639
Re: How do i say if event_var(userid) is #c then <command> ?
« Reply #14 on: July 10, 2007, 02:07:55 AM »
Yes, just remember, that #ct is not the ct team, but the c team, AND the t team.

Made that mistake before myself
=|[K|T]|= Real Wolf