Raised This Month: $51 Target: $400
 12% 

DOESN'T WORK ! <- CHANGE ME QUICK


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
He@dShot
Junior Member
Join Date: Apr 2008
Old 04-22-2008 , 06:29   DOESN'T WORK ! <- CHANGE ME QUICK
#1

Code:

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <chr_engine>
#include <engine>

new const Zombie_Model[] = "../valve/models/zombie.mdl";

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("ResetHUD", "New_Round","b")
}

public plugin_precache()
{
precache_model( Zombie_Model );
}

//********************************************* ********************************************
public New_Round(id)
{
cs_set_user_model(id,Zombie_Model)
}

It should make all players have the "Zombie_Model" but it does not work...I tries to assign all players on new round a model but IT DOESN"T WORK
He@dShot is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 04-22-2008 , 06:47   Re: DOESN'T WORK !
#2

First of all your file directory makes no sense at all. You dont jump straight to Valve and then find a models folder. If you do, then your models file is placed in the wrong place.

Also, chr_engine, why are you using this? This has no need. As well as engine. You do not need the engine.

Try this, I just hooked it up and fixed all your errors. Improve your indenting as well.

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

new const Zombie_Model[] = "models/zombie.mdl"


public plugin_init()
{
    
register_plugin("Zombie Model""1.0""BOYSplayCS")
    
    
register_event("HLTV""event_new_round""a""1=0""2=0")
}

public 
plugin_precache()
{
    
precache_model("Zombie_Model")
}

public 
event_new_round(id)
{
    
cs_set_user_model(idZombie_Model)
    return 
PLUGIN_HANDLED

EDIT: For better results use
PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
Instead of

PHP Code:
register_event("ResetHUD""New_Round","b"
PHP Code:
precache_modelZombie_Model ); 
SHOULD BE
PHP Code:
precache_model("Zombie_Model"
PHP Code:
new const Zombie_Model[] = "../valve/models/zombie.mdl"
SHOULD BE

PHP Code:
new const Zombie_Model[] = "models/zombie.mdl" 
ASSUMING that the model is inside your MODELS FOLDER.

I'm not saying this will work 100% but I just fixed that up in like literally 10 seconds.
Attached Files
File Type: sma Get Plugin or Get Source (zombie_model.sma - 664 views - 618 Bytes)

Last edited by BOYSplayCS; 04-22-2008 at 06:54.
BOYSplayCS is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 04-22-2008 , 08:44   Re: DOESN'T WORK !
#3

Player models need to go inside here:
models/player/MODELNAME/MODELNAME.MDL

If you do not follow the above standard then your model changing will not work!
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
Orangutanz
Veteran Member
Join Date: Apr 2006
Old 04-22-2008 , 08:49   Re: DOESN'T WORK !
#4

Quote:
Originally Posted by BOYSplayCS View Post
precache_model( Zombie_Model );
SHOULD BE
precache_model("Zombie_Model")
You are wrong, how he done it originally was correct!

cs_set_user_model(id,"zombie")
__________________
|<-- Retired from everything Small/Pawn related -->|
You know when you've been Rango'd
Orangutanz is offline
mateo10
Veteran Member
Join Date: Jan 2006
Old 04-22-2008 , 10:18   Re: DOESN'T WORK ! <- CHANGE ME QUICK
#5

AFAIK the HLTV event doesn't have the 'id' parameter. You will have to do a loop to get the player id's.
mateo10 is offline
He@dShot
Junior Member
Join Date: Apr 2008
Old 04-22-2008 , 12:41   Re: DOESN'T WORK ! <- CHANGE ME QUICK
#6

Hey, you think you're so smart but it doesn't work ! It says "
Error: could not load file models/player/models/zombie.mdl/models/zombie.mdl.md" and I did everything correctly !!!
He@dShot is offline
dangerix
Senior Member
Join Date: Aug 2007
Location: Germany
Old 04-22-2008 , 12:49   Re: DOESN'T WORK ! <- CHANGE ME QUICK
#7

If that's the error, you did not do everything correctly.

Quote:
Originally Posted by Orangutanz View Post
Player models need to go inside here:
models/player/MODELNAME/MODELNAME.MDL
You did:
models/player/models/MODELNAME.MDL/models/MODELNAME.MDL.md
dangerix is offline
He@dShot
Junior Member
Join Date: Apr 2008
Old 04-22-2008 , 12:56   Re: DOESN'T WORK ! <- CHANGE ME QUICK
#8

no I did not ! u try it and see what happens
He@dShot is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 04-22-2008 , 13:29   Re: DOESN'T WORK ! <- CHANGE ME QUICK
#9

Original Poster didn't make his topic title descriptive as it states to in the rules. Thread locked. Feel free to post the topic again, but this time use descriptive topic titles
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Closed Thread



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 07:48.


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