Raised This Month: $32 Target: $400
 8% 

Changing model for 1 round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Menethil
Senior Member
Join Date: Aug 2011
Old 08-30-2011 , 15:00   Changing model for 1 round
Reply With Quote #1

How do i set a function that changes your model with enemy model like ( gign -> leet )

After respawn to have back the initial model.

Like in war3ft mod, its a "mole" that spawns u in enemys base with clothes changed , and dont need to spawn in enemy base, just changing the mdl, like "chameleon" item.

I've tryed with that, to hard.

I've tryed something mixed from CS_shop. Its works , but its dont changing the model back after respawning. idk why.
Menethil is offline
The Inhabitant Of Heavens
Member
Join Date: Aug 2011
Old 08-30-2011 , 15:39   Re: Changing model for 1 round
Reply With Quote #2

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


public plugin_init() {
    
register_plugin("z""z""z")

    
register_clcmd("say command""command")
    
    
register_event("HLTV""event_round_start""a""1=0""2=0")
}

public 
event_round_start() 
    for(new 
id 1id <= get_maxplayers(); id++)
            
cs_reset_user_model(id);
            
public 
command(id
{
    if(
is_user_alive(id))
    {
        for(new 
id 1id <= get_maxplayers(); id++)
            
cs_set_user_model(id"vip")
            
    }

The Inhabitant Of Heavens is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 08-31-2011 , 04:08   Re: Changing model for 1 round
Reply With Quote #3

Thank you, idk why i went to complicated things .
God Bless You ^_^
Menethil is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-31-2011 , 05:55   Re: Changing model for 1 round
Reply With Quote #4

cs_set_user_model() is not recommended, it can cause client or even server crashes, there's at least one tutorial that explains how to do it a bit more complicated but more reliable... there's also a plugin made by connor that uses the efficient and reliable alternate system, search for them :}
__________________
Hunter-Digital is offline
Menethil
Senior Member
Join Date: Aug 2011
Old 08-31-2011 , 08:10   Re: Changing model for 1 round
Reply With Quote #5

Hunter , i 've tryed with that tuturial founded here , but its kinda hard for me to set the arays, variables , im not so pro in scripting as u guys, if anyone have some time, just to edit the method of giving the players model , would be great.

This plugin is already working, just that simply method that gives the player's model, cause lag on server.

Here is the plugin, search for case 5 and 6.
Attached Files
File Type: sma Get Plugin or Get Source (shopez3.sma - 590 views - 17.6 KB)
Menethil is offline
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 17:29.


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