Raised This Month: $ Target: $400
 0% 

Change user skin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
skz
Senior Member
Join Date: Jul 2014
Location: Portugal
Old 05-04-2016 , 14:07   Change user skin
Reply With Quote #1

Hi guys, I have a own menu for changing team in my server and personalized skins, and with instant auto team balance, even with the player models of connor, sometimes some users have T skin on CT side, or CT skin on T side...

I tryed this way to fix it, and it works, but when the server have a lot of players there, sometimes some players overflow...

PHP Code:
public new_round()
{    
    for(new 
i33i++)  
    {
        if(
is_user_connected(i))
        { 
            
set_task(3.0"models"i)
        }
    }
}

public 
models(id)
{
    if(
is_user_connected(id))
    {
        if ( 
cs_get_user_team(id) == CS_TEAM_CTcs_set_user_model(id"azul_ws")
        if ( 
cs_get_user_team(id) == CS_TEAM_Tcs_set_user_model(id"vermelho_ws")
    }
    
    
remove_task(id)

Is there a better way to make this? I already tryed with saving the user team in a variable and in the next round if he his in another team, change the skin, but it doesn't work because sometimes the player change team, and instant auto team ballance puts them in the other team again and they will have the skin of the team he changed...
I already tryed to save in a bool if the user was team ballanced but it doesnt work and I dont know why...
__________________

Last edited by skz; 05-04-2016 at 14:13.
skz 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