AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Changin Model via Steamid (https://forums.alliedmods.net/showthread.php?t=134263)

mottzi 08-02-2010 19:05

Changin Model via Steamid
 
Hello guys!

Im trying to change the Model by my Steamid:

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <zombieplague>

public plugin_init() {
    
RegisterHam(Ham_Spawn"player""fwHamPlayerSpawnPost"1)
}

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

public 
fwHamPlayerSpawnPost(id
{
    
set_task(3.0"model_set1"id)
}

public 
model_set1(id)
{
    if(
is_user_alive(id) && !zp_get_user_zombie(id))
    {
        new 
steamid[36]
        
get_user_authid(idsteamid35)
        if(
equal(steamid "STEAM_0:1:18593568"))
        {
            
cs_set_user_model(id"mottzi")
        }
    }


Model Prechached, and Its in the Player Folder but why it dont works?!

Please Help me guys i rly need that.

nikhilgupta345 08-02-2010 19:26

Re: Changin Model via Steamid
 
You wouldn't pass an id in set_task, that is supposed to a number such as 0 or 1 or something that is a unique id to the task, Also, not sure if u can pass an id in the model_set1 function, idk :/

Rosenstein 08-02-2010 19:30

Re: Changin Model via Steamid
 
You could also check this plugin ==> http://forums.alliedmods.net/showthread.php?p=958925

mottzi 08-02-2010 19:45

Re: Changin Model via Steamid
 
i tryd that but it also didnt work, maybe its zombieplague?

fysiks 08-02-2010 20:06

Re: Changin Model via Steamid
 
Quote:

Originally Posted by nikhilgupta345 (Post 1259804)
You wouldn't pass an id in set_task, that is supposed to a number such as 0 or 1 or something that is a unique id to the task, Also, not sure if u can pass an id in the model_set1 function, idk :/

You can pass id as the task id. In fact, the way that model_set1() is set up you have to pass id as the task id.

mottzi 08-02-2010 20:11

Re: Changin Model via Steamid
 
so can you give me the right way?

fysiks 08-03-2010 01:35

Re: Changin Model via Steamid
 
Quote:

Originally Posted by mottzi (Post 1259839)
so can you give me the right way?

It depends on the situation. There is no "one and only one" right way.

AfteR. 08-03-2010 01:45

Re: Changin Model via Steamid
 
AFAIK, you cant change models in that way using ZP.

Vechta 08-03-2010 02:01

Re: Changin Model via Steamid
 
Quote:

Originally Posted by mottzi (Post 1259839)
so can you give me the right way?

cs_set_user_model code dont work on zombie plague

mottzi 08-03-2010 04:45

Re: Changin Model via Steamid
 
and how i can do it else, vechta or atfeR?


All times are GMT -4. The time now is 00:05.

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