Raised This Month: $ Target: $400
 0% 

Delay Skin Replacement


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HLM
Senior Member
Join Date: Apr 2008
Location: C:\WINDOWS\System32
Old 10-03-2009 , 20:40   Re: Delay Skin Replacement
Reply With Quote #4

This should work..

PHP Code:
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

public plugin_init()
{
        
register_plugin("Cookie Monster Battle""1.0""REPLACE THIS!!")
        
//register_event("ResetHUD", "resetModel", "b")
    
registerham(Ham_Spawn"player""resetModel"1)
}

public 
plugin_precache() 
{
        
precache_model("models/player/cookie/cookie.mdl")
}

public 
resetModel(id)
{
    if (
cs_get_user_team(id) == CS_TEAM_T//is this what we are delaying?
        
set_task(2.0"SetModel"id)
    
//cs_set_user_model(id, "cookie")
    
else
        
cs_reset_user_model(id)
}

public 
SetModel(id)
    
cs_set_user_model(id"cookie"
but be warned, I did NOT test this
__________________
+|- KARMA Respectively


Last edited by HLM; 10-03-2009 at 20:41. Reason: php tags > small tags
HLM 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 22:36.


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