This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Where is a mistake?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DeathB
Junior Member
Join Date: Apr 2005
Old 04-27-2005 , 09:05   Where is a mistake?
Reply With Quote #1

Quote:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>

public plugin_init() {
register_plugin("change model", "0.1", "test")
register_event("ResetHUD", "resetModel", "b")
return PLUGIN_CONTINUE
}

public plugin_precache() {
precache_model("models/player/demetra/dem.mdl")
precache_model("models/player/demetra/dem1.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_D) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "dem")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "dem1")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}
It is adminmodel plugin by whiteamika, i tried to change it a bit but nothing works (
P.S.I've seted flag P to users.ini
DeathB is offline
Basic-Master
Veteran Member
Join Date: Apr 2005
Location: hello pm
Old 04-27-2005 , 09:10  
Reply With Quote #2

create two new folders in modesl/player called "dem" and "dem1" and move dem.mdl to dem and dem1.mdl to dem1.. then you should update all filenames and then it ought work
Basic-Master is offline
Send a message via ICQ to Basic-Master Send a message via MSN to Basic-Master
DeathB
Junior Member
Join Date: Apr 2005
Old 04-27-2005 , 16:09  
Reply With Quote #3

I did it but nothing happened. I made new folder dem/dem.mdl and change demetra to dem in script
DeathB is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 04-27-2005 , 18:54  
Reply With Quote #4

try this:
Code:
public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_LEVEL_D) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "models/player/demetra/dem.mdl")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "models/player/demetra/dem1.mdl")
}
else {
cs_reset_user_model(id)
}
}
__________________
alias White Panther
karlos is offline
DeathB
Junior Member
Join Date: Apr 2005
Old 04-29-2005 , 14:02  
Reply With Quote #5

It works but only if u ar dead. If u ar alive nothing changes, standart model, but when u ar dead, corpse has a custom model. Anybody knows how to fix it?
DeathB is offline
KyleD
Member
Join Date: Mar 2005
Location: Anchorage, AK
Old 04-29-2005 , 14:31  
Reply With Quote #6

is_user_alive
__________________
KyleD is offline
Send a message via MSN to KyleD
DeathB
Junior Member
Join Date: Apr 2005
Old 04-29-2005 , 14:45  
Reply With Quote #7

And this model can see only 1 man from all the server. Very strange.
DeathB is offline
DeathB
Junior Member
Join Date: Apr 2005
Old 05-01-2005 , 04:33  
Reply With Quote #8

I need u help please!
DeathB 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 08:43.


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