Raised This Month: $ Target: $400
 0% 

[SOLVED]how to do anything on player without checking...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-16-2009 , 06:30   [SOLVED]how to do anything on player without checking...
Reply With Quote #1

how can i change players team without
if(is_user_alive(id)) ?

i tried this but i got error :

PHP Code:
for ( new iiNumi++ )
{

      
cs_set_user_team(i,CS_TEAM_T)      


but maybe i want to transfer the dead players too oO is there no way?
__________________

Last edited by One; 10-16-2009 at 06:50.
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-16-2009 , 06:35   Re: how to do anything on player without checking...
Reply With Quote #2

more code... if you have get_players there, it should be like players[ i ]
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-16-2009 , 06:41   Re: how to do anything on player without checking...
Reply With Quote #3

nope. i dont. i just want to transfer all players(dead or alive) to T.but when i check if is user alive,my dead players will not transfered and when i dont check, nobody willbe tranfered.
& sorry forget my first code. this is my right code :

PHP Code:
for(1<= g_MaxPlayersi++)    
{         
cs_set_user_team(i,CS_TEAM_T)    

__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-16-2009 , 06:43   Re: how to do anything on player without checking...
Reply With Quote #4

is_user_connected ?
__________________
xPaw is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-16-2009 , 06:49   Re: how to do anything on player without checking...
Reply With Quote #5

huh? sry but i learned to ask ever if is user alive. this is new for me. when you say that this works, then works too.
ty
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Jon
Veteran Member
Join Date: Dec 2007
Old 10-16-2009 , 07:12   Re: [SOLVED]how to do anything on player without checking...
Reply With Quote #6

If you want to include dead players, use is_user_connected, if only want to include alive, use is_user_alive?
Jon is offline
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 10-16-2009 , 10:04   Re: how to do anything on player without checking...
Reply With Quote #7

Quote:
Originally Posted by One View Post
huh? sry but i learned to ask ever if is user alive. this is new for me. when you say that this works, then works too.
ty
lol'd.
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-16-2009 , 10:15   Re: [SOLVED]how to do anything on player without checking...
Reply With Quote #8

yea sry that i never this in c#
i can search for my old threads in which anyone writed that i have ever check if is player alived all what i know about amxx , is that what users say or what i saw to learn oO
lol?
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
vitorrd
Senior Member
Join Date: Jul 2009
Old 10-16-2009 , 12:58   Re: [SOLVED]how to do anything on player without checking...
Reply With Quote #9

I told you more than once to look at the funcwiki, haven't I? You can answer 99% of your question simply looking at the wiki with the right keywords.
vitorrd is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-16-2009 , 13:03   Re: [SOLVED]how to do anything on player without checking...
Reply With Quote #10

You should reconsider get_players.

Anyway :

( Check if player is CT prevent the plugin from switchng spec and to set again Ts )

PHP Code:
for(id 1id <= g_MaxPlayersid++)    
{
    if( 
is_user_connected(id) && cs_get_user_team(id) == CS_TEAM_CT )
    {     
        
cs_set_user_team(idCS_TEAM_T)
    }  

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode