Raised This Month: $ Target: $400
 0% 

Change user skin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 05-04-2016 , 16:45   Re: Change user skin
Reply With Quote #7

Quote:
Originally Posted by skz View Post
PHP Code:
public new_round()
{    
    new 
players[32],inum 
    get_players
(players,inum,"c"
    for(new 
0;i<inum;i++) 
    { 
        if(
task_exists(TASK_SETMODEL))  remove_task(TASK_SETMODEL
        
set_task(3.0,"models"TASK_SETMODEL)  
    }
}

public 
models() 

    new 
players[32],inum 
    get_players
(players,inum,"a"
    for(new 
0;i<inum;i++) 
    { 
        switch(
cs_get_user_team(players[i]))
        { 
            case 
CS_TEAM_Tcs_set_user_model(players[i], "vermelho_ws"
            case 
CS_TEAM_CTcs_set_user_model(players[i],"azul_ws"
        } 
    }  
    
remove_task(TASK_SETMODEL)

this way worked, thanks for your help!

Yes, but remove get players and loop at round start event

Use this code:

PHP Code:
public new_round()
{    
    
   if(
task_exists(TASK_SETMODEL))  remove_task(TASK_SETMODEL
   
set_task(3.0,"models"TASK_SETMODEL)  
    
}

public 
models() 

    new 
players[32],inum 
    get_players
(players,inum,"a"
    for(new 
0;i<inum;i++) 
    { 
        switch(
cs_get_user_team(players[i]))
        { 
            case 
CS_TEAM_Tcs_set_user_model(players[i], "vermelho_ws"
            case 
CS_TEAM_CTcs_set_user_model(players[i],"azul_ws"
        } 
    }  
    
remove_task(TASK_SETMODEL)

siriusmd99 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 18:39.


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