Raised This Month: $ Target: $400
 0% 

iCount not working properly.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
proffs
Senior Member
Join Date: Jul 2013
Old 08-17-2013 , 11:19   Count Players.
Reply With Quote #10

I am using this right now:
PHP Code:
public Ham_PlayerKillediVictimiAttackershouldgib )
{
        new 
iPlayers32 ], iCount;
        
        
get_playersiPlayersiCount"aech""TERRORIST" )
        
        if( 
iCount == StopGame();

I am calling it like this:

PHP Code:
public SniperGame()
{
    
g_iCurrentGame GAME_Sniper
    
    
new iPlayers[32]
    new 
iNum
    
new id
    
    set_cvar_num
("mp_friendlyfire",1)
    
    
get_playersiPlayersiNum"a" )
    
    for( new 
0iNumi++ )
    {
        
id iPlayers[i]
        
        
set_hudmessage 692300, -1.00.3500.15.00.10.1, -
        
show_hudmessage 0"[RPGSD]: Sniper Game Started!")
        
        
strip_user_weaponsid )
        
        if (
cs_get_user_team(id) == CS_TEAM_CT)
        {
            
give_item(id"weapon_knife")
            
give_item(id"weapon_m4a1"
            
give_item(id"weapon_deagle")
            
cs_set_user_bpammoidCSW_M4A190 )
            
cs_set_user_bpammoidCSW_DEAGLE35 )
            
set_user_godmode(id1)
            
fm_reset_user_model(id
But the problem is that when there is 2 lefts, StopGame command runs it automatic.
Because it thinks 1 of the T is CT. He gets CT skin and so on.
Am i doing it wrong?

I got this code from my friend.
But I don't know how to use it can someone help me?

PHP Code:
stock getPlayers(CsTeams:iTeam)
{
new 
players
for(new 133i++)
if(
is_user_connected(i) && !is_user_bot(i) && is_user_alive(i))
if(
cs_get_user_team(i) == iTeamplayers++

return 
players

PHP Code:
if(getPlayers(CS_TEAM_T) == 1

Last edited by proffs; 08-17-2013 at 11:26.
proffs is offline
 



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 15:55.


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