Raised This Month: $ Target: $400
 0% 

[HELP] Player Models


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-01-2008 , 16:12   [HELP] Player Models
Reply With Quote #1

I want to make this only for the CT, and for all players, can someone help me with this?


Code:
 
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init() {
        register_plugin("AvP Models", "1.2.0", "whitemike")
        register_event("ResetHUD", "resetModel", "b")
        return PLUGIN_CONTINUE
}
public plugin_precache() {
        precache_model("models/player/NGPred/NGPred.mdl")
        precache_model("models/player/admin_te/admin_te.mdl")
        return PLUGIN_CONTINUE
}
public resetModel(id, level, cid) {
        if (get_user_flags(id) & ADMIN_KICK) {
                new CsTeams:userTeam = cs_get_user_team(id)
                if (userTeam == CS_TEAM_T) {
                        cs_set_user_model(id, "NGPred")
                }
                else if(userTeam == CS_TEAM_CT) {
                        cs_set_user_model(id, "NGPred")
                }
                else {
                        cs_reset_user_model(id)
                }
        }
        return PLUGIN_CONTINUE
}
I want to make this only for the CT, and for all players, can someone help me with this?
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Churchboy587
BANNED
Join Date: Oct 2008
Old 11-01-2008 , 16:14   Re: [HELP] Player Models
Reply With Quote #2

Quote:
Originally Posted by Drug
I want to make this only for the CT, and for all players, can someone help me with this?

*twitch* O.o WHAT???
Churchboy587 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-01-2008 , 16:15   Re: [HELP] Player Models
Reply With Quote #3

To make it non-admin, and for only the CT
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Churchboy587
BANNED
Join Date: Oct 2008
Old 11-01-2008 , 16:26   Re: [HELP] Player Models
Reply With Quote #4

I see...


I took a crack at fixing it, and took my first look:
1. It was all invalid functions
2. I changed it, and still was invalid functions


You did something horribly wrong -.-
Churchboy587 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-01-2008 , 16:27   Re: [HELP] Player Models
Reply With Quote #5

Obviously thats why i came here to ask...
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Churchboy587
BANNED
Join Date: Oct 2008
Old 11-01-2008 , 16:39   Re: [HELP] Player Models
Reply With Quote #6

All true mate.

Right on!

Last edited by YamiKaitou; 11-01-2008 at 17:28. Reason: spammed
Churchboy587 is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 11-01-2008 , 16:41   Re: [HELP] Player Models
Reply With Quote #7

Well i think i found the solution to my own plugin, but i still need to give every CT the skin, and i think thats using the flag "z"

So how can i turn "ADMIN_KICK" to whatever the flag "z" means
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Old 11-01-2008, 16:48
Churchboy587
This message has been deleted by YamiKaitou. Reason: spam
Old 11-01-2008, 16:50
DruGzOG
This message has been deleted by YamiKaitou. Reason: spam
Old 11-01-2008, 16:55
Churchboy587
This message has been deleted by YamiKaitou. Reason: spam
vato loco [GE-S]
Veteran Member
Join Date: Oct 2006
Location: Germany
Old 11-02-2008 , 07:12   Re: [HELP] Player Models
Reply With Quote #8

for CT and everyone
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <cstrike>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"


public plugin_init() {
    
register_plugin("AvP Models""1.2.0""whitemike")
    
register_event("ResetHUD""resetModel""b")
    
}
public 
plugin_precache() {
    
precache_model("models/player/NGPred/NGPred.mdl")
}

public 
resetModel(idlevelcid) {
    
    new 
CsTeams:userTeam cs_get_user_team(id)
    
    if(
userTeam == CS_TEAM_CT) {
        
cs_set_user_model(id"NGPred")
    }
    else {
        
cs_reset_user_model(id)
    }
    return 
PLUGIN_CONTINUE

__________________
vato loco [GE-S] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-02-2008 , 08:24   Re: [HELP] Player Models
Reply With Quote #9

You should not use ResetHUD in such case to detect player spawn. See the tuto. See http://forums.alliedmods.net/showthread.php?t=42159

Thanks for you awesome comment, someone : i do Not like the french. they are A bunch of pussies and get there asses kicked!
__________________

Last edited by Arkshine; 11-03-2008 at 09:38.
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 20:05.


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