Raised This Month: $ Target: $400
 0% 

Changing models doesn't work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-29-2009 , 13:23   Changing models doesn't work
Reply With Quote #1

Somehow this does nothing, no models changed.
PHP Code:
public pChangeModels() {
    new 
Players[32
    new 
playerCountiid
    get_players
(PlayersplayerCount
    for (
i=0i<playerCounti++) { 
           
id Players[i]
        if(
cs_get_user_team(id) != CS_TEAM_T) return PLUGIN_HANDLED
        cs_set_user_model
(id"JailBreak")
    }
    
set_task(10.0"pChangeModels")

It's called in plugin_init().
Backstabnoob is offline
shuttle_wave
Veteran Member
Join Date: Apr 2009
Location: New Zealand
Old 12-29-2009 , 18:33   Re: Changing models doesn't work
Reply With Quote #2

PHP Code:
cs_set_user_model(id"JailBreak"
??? "JailBreak" u need the full location like models/player/jailbreak/guard.mdl

why dont u use the player models plugin but connormcleod
__________________
JailBreak Mod with Plugin API ( 90% ) Public
shuttle_wave is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 12-31-2009 , 02:56   Re: Changing models doesn't work
Reply With Quote #3

NO I DON'T.

Why should I use his plugin, if I want mine? I'm adding THIS into my code.

I tried to do it this way on HAM_Spawn, but that threw everyone out with SVC_BAD. I think this will not happen if I use set_user_info(), but I don't know how to use it right when user changes his model (M - Counter terrorist - Gign). If anyone know how to do it this via this method, I'll by happy.

Last edited by Backstabnoob; 12-31-2009 at 03:11.
Backstabnoob is offline
AppStore
BANNED
Join Date: Dec 2009
Location: Saladillo
Old 12-31-2009 , 08:44   Re: Changing models doesn't work
Reply With Quote #4

Not so?
PHP Code:
public pChangeModels() {
    new 
Players[32
    new 
playerCountiid
    get_players
(PlayersplayerCount
    for (
i=0i<playerCounti++) { 
        
id Players[i]
        if(
cs_get_user_team(Players[i]) != CS_TEAM_T) return PLUGIN_HANDLED
        cs_set_user_model
(Players[id], "JailBreak")
    }
    
set_task(10.0"pChangeModels")
    
    return 
PLUGIN_HANDLED

AppStore is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-31-2009 , 08:57   Re: Changing models doesn't work
Reply With Quote #5

Use this : http://forums.alliedmods.net/showthread.php?p=958925
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-31-2009 , 10:39   Re: Changing models doesn't work
Reply With Quote #6

Quote:
Originally Posted by shuttle_wave View Post
PHP Code:
cs_set_user_model(id"JailBreak"
??? "JailBreak" u need the full location like models/player/jailbreak/guard.mdl

why dont u use the player models plugin but connormcleod
No. You don't need the full path. You need only the name.


Quote:
Originally Posted by Backstabnoob View Post
NO I DON'T.

Why should I use his plugin, if I want mine? I'm adding THIS into my code.

I tried to do it this way on HAM_Spawn, but that threw everyone out with SVC_BAD. I think this will not happen if I use set_user_info(), but I don't know how to use it right when user changes his model (M - Counter terrorist - Gign). If anyone know how to do it this via this method, I'll by happy.
Because cs_set_user_model() is known to generate svc_bad error and so kicks. PlayerModel by Connor uses another method to render the model. If you want to use your own plugin, use at least his method.
__________________
Arkshine 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 04:13.


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