Raised This Month: $ Target: $400
 0% 

Changin Model via Steamid


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-02-2010 , 19:05   Changin Model via Steamid
Reply With Quote #1

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.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 08-02-2010 , 19:26   Re: Changin Model via Steamid
Reply With Quote #2

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 :/
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-02-2010 , 20:06   Re: Changin Model via Steamid
Reply With Quote #3

Quote:
Originally Posted by nikhilgupta345 View Post
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.
__________________
fysiks is online now
Rosenstein
Senior Member
Join Date: Feb 2008
Location: Serbia
Old 08-02-2010 , 19:30   Re: Changin Model via Steamid
Reply With Quote #4

You could also check this plugin ==> http://forums.alliedmods.net/showthread.php?p=958925
__________________
+1
Rosenstein is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-02-2010 , 19:45   Re: Changin Model via Steamid
Reply With Quote #5

i tryd that but it also didnt work, maybe its zombieplague?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-02-2010 , 20:11   Re: Changin Model via Steamid
Reply With Quote #6

so can you give me the right way?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-03-2010 , 01:35   Re: Changin Model via Steamid
Reply With Quote #7

Quote:
Originally Posted by mottzi View Post
so can you give me the right way?
It depends on the situation. There is no "one and only one" right way.
__________________
fysiks is online now
Vechta
Veteran Member
Join Date: Jun 2010
Old 08-03-2010 , 02:01   Re: Changin Model via Steamid
Reply With Quote #8

Quote:
Originally Posted by mottzi View Post
so can you give me the right way?
cs_set_user_model code dont work on zombie plague
Vechta is offline
AfteR.
Veteran Member
Join Date: Dec 2008
Location: λ
Old 08-03-2010 , 01:45   Re: Changin Model via Steamid
Reply With Quote #9

AFAIK, you cant change models in that way using ZP.
AfteR. is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 08-03-2010 , 04:45   Re: Changin Model via Steamid
Reply With Quote #10

and how i can do it else, vechta or atfeR?
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers

Last edited by mottzi; 08-03-2010 at 04:54.
mottzi is offline
Send a message via MSN to mottzi
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 00:05.


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