IPB

Welcome Guest ( Log In | Register )


Welcome to the nsMod Community Forum (formerly modNS) - please have a look around.
Its recommended that you create a member account so you can access all the features available to members.
Forum activity / posting rewards you with many privileges. Registration is free and only takes a few moments to complete.

 
Reply to this topicStart new topic
> public client_changeteam( id , newteam , oldteam ), which number is spector and readyroom ?
Mega
post Apr 24 2010, 03:04 PM
Post #1
  


Omnisoroth
Group Icon

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
 
Go to the top of the page
PM  
+Quote Post
 
mE
post Jul 28 2010, 08:07 PM
Post #2
  


Senior Developer
Group Icon

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");
}
 
Go to the top of the page
PM  
+Quote Post
 

Reply to this topicStart new topic

 

RSS Lo-Fi Version Time is now: 8th September 2010 - 01:07 AM
Skin Design By: ___T_H_E_G_A_M_E___ for Dream-Skins.Net