Raised This Month: $ Target: $400
 0% 

Model delay works bad


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 05-03-2010 , 16:04   Model delay works bad
Reply With Quote #1

When player respawns model hardly changes maybe someone knows how ?
Becouse classes have different models and when respawn another class model still remains and when about 10 seconds go he changes to hes class model.

PHP Code:
#define TASK_DELAY 0.5    
#define TASKID_MODEL        3810 

new player_model[33][32]
new 
Floatg_counter

        
new currentmodel[32];
        
fm_get_user_model(idcurrentmodelsizeof currentmodel 1);
        
        if(!
equal(currentmodelplayer_model[id]))
        {
            
set_task(0.1 g_counter"Task_Model"id TASKID_MODEL)
            
g_counter += TASK_DELAY;
        }


public 
Task_Model(task)
{
    new 
id task TASKID_MODEL 
    
    fm_set_user_model
(idplayer_model[id])
}

stock fm_set_user_model(playermodelname[])
{   
    
engfunc(EngFunc_SetClientKeyValueplayerengfunc(EngFunc_GetInfoKeyBufferplayer), "model"modelname)
    
    
g_model[player] = true
}

stock fm_get_user_model(playermodel[], len)
{   
    
engfunc(EngFunc_InfoKeyValueengfunc(EngFunc_GetInfoKeyBufferplayer), "model"modellen)
}

stock fm_reset_user_model(player)
{         
    
g_model[player] = false
    
    dllfunc
(DLLFunc_ClientUserInfoChangedplayerengfunc(EngFunc_GetInfoKeyBufferplayer))

DoviuX is offline
Send a message via Skype™ to DoviuX
 



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 03:48.


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