![]() ![]() |
Apr 24 2010, 03:04 PM
Post
#1
|
|
|
Omnisoroth
![]() Group: Members Member No.: 6,706 Joined: 12-December 07 Posts: 40 Posts per day: 0.04 Topics Started: 8 Skin: Full Metal Blue User's local time: Sep 8 2010, 01:07 AM From: 1 Windows or Linux ?: Win |
like the topic says
i have in the script: CODE if (oldteam == 0) { if ((newteam == 1) || (newteam == 2)) { set_task(0.1,"teamup") } } so my question is is it possible to detect with oldteam if user was in readyroom or spector ? and with newteam which spezies he is now (alien or marine, team1 or team2) so i hope oldteam 0 is spector and readyroom isnt it ? and maybe i could change set_task to retrun teamup() but that later... EDIT: Asmodee' answerd that allready on irc thx again Asmodee' he sayed QUOTE spectator is 0 also spectator and readyroom are both 0 marine is 1, alien is 2 Mega This post has been edited by Mega: Apr 24 2010, 08:21 PM |
Jul 28 2010, 08:07 PM
Post
#2
|
|
|
Senior Developer
Group: Developers Member No.: 1,984 Joined: 2-January 04 Posts: 818 Posts per day: 0.34 Topics Started: 49 Skin: IP.Board Pro User's local time: Sep 8 2010, 03:07 AM From: Germany - Near Cologne Windows or Linux ?: Lin |
As already said, both readyroom and spectator are team 0 (same applies to pev(id,pev_team) etc.). In order to distinguish both teams, one can use get_user_team(id,str[],len) instead:
CODE stock is_spectator(id){
new myteam[2]; get_user_team(id,myteam,1); return equal(myteam,"s"); //return equal(myteam,"spectatorteam"); } |
![]() ![]() |
|
Lo-Fi Version | Time is now: 8th September 2010 - 01:07 AM |