Raised This Month: $ Target: $400
 0% 

How to set delayed change of player models on roundstart?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Servak
Member
Join Date: Feb 2007
Location: Russia, Ryazan
Old 11-03-2008 , 09:51   Re: How to set delayed change of player models on roundstart?
Reply With Quote #1

Can you help me?
I changed code like that
PHP Code:
// Now making a message and set some stuff
    
for (new i=0i<numi++)
    {
        
id players[i]
        if (
id==g_FirstVADA)
        {
            
            
client_print(id,print_chat,"* [H&S] You are VADA!")
            
            
// Change model speed & godmode
            
cs_set_user_model(id,"vip")
            
set_user_godmode(id,1)
            
set_user_footsteps(id,1)
            
set_user_gravity(id,1.0)
        }
        else
        {
            new 
name[32]
            
get_user_name(g_FirstVADA,name,31)
            
            
client_print(id,print_chat,"* [H&S] VADA is %s",name)
            
            
// Change model speed & godmode
            
set_task(1.0 g_models_counter"task_set_model"id+MODELSET_TASK)
                           
g_models_counter += TASK_DELAY
            set_user_godmode
(id)
            
set_user_footsteps(id,0)
            
set_user_gravity(id,g_Gravity)
        }
    }
    
    
g_RoundStarted=true 
But all what i have - delayed momentarely change of all models, it's going to crash again with delay in 1 second
This is my task_set_model:
PHP Code:
public task_set_model(id)
{
    
// Get player id
    
id -= MODELSET_TASK
    
    
// Actually set the player's model
    
fm_set_user_model(id"gign")

How to make asynchronized changing?
__________________
I have 6 24\7 LAN CS 1.6 Servers.

Last edited by Servak; 11-03-2008 at 09:53.
Servak is offline
Send a message via ICQ to Servak
Servak
Member
Join Date: Feb 2007
Location: Russia, Ryazan
Old 11-03-2008 , 10:35   Re: How to set delayed change of player models on roundstart?
Reply With Quote #2

Please help me I trying to do this almost 4 hours, but every time i have this crash

This is original plugin.
Attached Files
File Type: sma Get Plugin or Get Source (h&s.sma - 749 views - 26.8 KB)
__________________
I have 6 24\7 LAN CS 1.6 Servers.
Servak is offline
Send a message via ICQ to Servak
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 09:24.


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