AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   model change (https://forums.alliedmods.net/showthread.php?t=24506)

AAleaderNik 02-24-2006 20:05

model change
 
Code:

#include <amxmodx>
#include <engine>
#include <amxmisc>

public plugin_init()
{
        register_plugin("Model basis","1.0","AANik")
        register_event("Resethud","setplayermodel","be")
        register_cvar("custmodel_on", "1")
        return PLUGIN_CONTINUE
}

public plugin_precache()
{
        precache_model("models/player/arctic/arctic.mdl")
        return PLUGIN_CONTINUE
}

public switchmodel(id)
{
        if(get_cvar_num("custmodel_on") == 1) (
       
                switchmodel(id)
        )
}

i hope this is what u want by reposting but ya i need to know whats wrong with the code or why it doesnt work im tryin to get it so the people have to download the model and so it overrides their arctic model

watch 02-24-2006 22:53

Code:
#include <amxmodx> #include <cstrike> public plugin_init() {     register_plugin("Model basis","1.0","AANik")     register_event("ResetHUD","setplayermodel","be")     register_cvar("custmodel_on","1") } public plugin_precache() {     precache_model("models/player/arctic/arctic.mdl") } public setplayermodel(id) {     if(get_cvar_num("custmodel_on"))     {          cs_set_user_model(id,"models/player/arctic/arctic.mdl")     }     }

use the small tags as it makes it pretty and you can't overwrite files you would have to name it artic2 or put it in a subfolder

Xanimos 02-24-2006 23:00

wont work. The clients won't download the model.

watch 02-24-2006 23:01

because you can't overwrite existing files, i did mention that in my post :o

Xanimos 02-24-2006 23:02

No thats not it. It's because the client wont download a file it already has is the reason it won't work.

watch 02-24-2006 23:06

hmm ok thats what i meant, maybe overwrite wasnt the best wording, i interpret it as the same thing though :?

the file already exists, therefore you can't overwrite it. I think i got the overwrite thing from his post :F

Quote:

im tryin to get it so the people have to download the model and so it overrides their arctic model

watch 02-24-2006 23:35

eep sorry to double post, but reading it again ive realised that maybe i wasn't as clear as i could have been, i was talking about client side too :p and that he should rename the file and change the script dir accordingly, my bad :oops:

v3x 02-25-2006 00:03

Code:
cs_set_user_model(id , "somemodel"); // models/player/somemodel/somemodel.mdl

AAleaderNik 02-25-2006 05:03

ok maybe i might have used the wrong word all i want it to do is make it so everybody sees it like when u shoot somebody on uwc3 server with hex and they turn into that alien thing and everybody sees that thats what i want like for example lets say i wanted a simpson server and all ct skins were bart homer lisa marge, etc and i wanted everybody to see the skins what code would let me do that


All times are GMT -4. The time now is 20:22.

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