Raised This Month: $ Target: $400
 0% 

function get_players error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MasterKy
Junior Member
Join Date: Aug 2009
Old 09-02-2009 , 13:56   function get_players error
Reply With Quote #1

PHP Code:
public ultimoPlayer(){
    
server_cmd("amx_execall spk misc/roaring")
    
get_players gi_playersgi_playercnt"a")
    
    for ( 
gi_playernum 0gi_playernum gi_playercntgi_playernum++ )
    {
        
gi_playerID gi_players[gi_playernum]
        
        
set_user_health(gi_playerID,100)
        
set_user_godmode(gi_playerID,0)
        
visivel(gi_playerID)
    }
}

public 
ultimoPlayerSetModel(){
        
get_players gi_playersgi_playercnt"ah""CS_TEAM_T" )
    
    for ( 
gi_playernum 0gi_playernum 1gi_playernum++ )
    {
        
gi_playerID gi_players[gi_playernum]
        
        
cs_set_user_model(gi_playerID,"gign")
client_print(0,print_chat"O ultimo TR agora esta com roupa de CT! Cuidado!!")
        
    }

this dont work, only the
server_cmd("amx_execall spk misc/roaring")

what is the error in this?
thanks!!
MasterKy is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 09-02-2009 , 14:11   Re: function get_players error
Reply With Quote #2

Code:
public ultimoPlayer( ) {     server_cmd("amx_execall spk misc/roaring");         new iPlayers[ 32 ], iCount, id;     get_players( iPlayers, iCount, "a" );         for( new i = 0; i < iCount; i++ ) {         id = iPlayers[ i ];                 set_user_health( id, 100 );         set_user_godmode( id, 0 );         visivel( id );     } }

And Change "CS_TEAM_T" to "CT"
__________________

Last edited by xPaw; 09-02-2009 at 14:15.
xPaw is offline
MasterKy
Junior Member
Join Date: Aug 2009
Old 09-03-2009 , 11:54   Re: function get_players error
Reply With Quote #3

oh ok but and the ultimoPlayerSetModel()?? this dont work too
MasterKy is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-03-2009 , 12:12   Re: function get_players error
Reply With Quote #4

PHP Code:
public ultimoPlayerSetModel( ) {
    new 
iPlayers32 ], iCountid;
    
get_playersiPlayersiCount"a" );
    new 
bool:bTerr false;
    for( new 
0iCounti++ ) {
        
id iPlayers];
        if( 
cs_get_user_teamid ) == CS_TEAM_T ) {
            
cs_set_user_modelid"gign" );
            if( !
bTerr ) {
                
bTerr true;
                
client_print0print_chat"O ultimo TR agora esta com roupa de CT! Cuidado!!" );
            }
        }
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 14:59.


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