Raised This Month: $ Target: $400
 0% 

Need help with "set user model" and a hud message.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 10-28-2009 , 18:51   Need help with "set user model" and a hud message.
Reply With Quote #1

Hello, I've searched all the forum and tried it many ways, but still it doesn't work.
Here's my problem, right now I'm using cstrike to change user models and its giving svc_bad and kicking many people off my server. I want the model to be Smith model, but without cstrike. It would be grate if it could work with Ham.

The second thing is, that I want it to show when a Vip has connected to the server.

And the third thing is, that I want to show the player status like VIP on hud message, I already have the code for the hud message, but I cant make it to display the status, my idea is, that it would get the status by acces flags.

Here are portions of the codes.

Model:
PHP Code:
public plugin_precache() {
    
precache_model("models/player/smith/smith.mdl")
    
    return 
PLUGIN_CONTINUE
}

public 
resetModel(idlevelcid) {
    if (
get_user_flags(id) & ADMIN_CVAR) {
        new 
CsTeams:userTeam cs_get_user_team(id)
        if (
userTeam == CS_TEAM_T) {
            
cs_set_user_model(id"smith")
        }
        else if(
userTeam == CS_TEAM_CT) {
            
cs_set_user_model(id"smith")
        }
        else {
            
cs_reset_user_model(id)
        }
    }
    
    return 
PLUGIN_CONTINUE

Connection message:
PHP Code:
            set_hudmessage(255255255, -1.00.3504.04.02.02.04);
            
show_hudmessage(0"VIP %s has joined the server!"szName); 
The connection messages has been taken from this plugin http://forums.alliedmods.net/showthread.php?t=76883

Hoping to get some help vL.
Also +karma to anyone who can help me

Last edited by vL.; 11-02-2009 at 10:37.
vL. is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 11-02-2009 , 10:36   Re: Help with a Vip plugin.
Reply With Quote #2

Okay, I got the Connection message working. So I only need the models thing and hud message.
vL. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-02-2009 , 10:49   Re: Need help with "set user model" and a hud message.
Reply With Quote #3

http://forums.alliedmods.net/showthread.php?t=106094
http://forums.alliedmods.net/showthread.php?t=69386
__________________
Arkshine is offline
vL.
Senior Member
Join Date: Aug 2009
Location: Estonia
Old 11-02-2009 , 10:58   Re: Need help with "set user model" and a hud message.
Reply With Quote #4

1. Its not what I need and its using cstrike :S
2. I've read it, but I didn't understand it.

I need it to be inserted to the Vip plugin what I have.
vL. is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 11-02-2009 , 11:36   Re: Need help with "set user model" and a hud message.
Reply With Quote #5

It's what you want.

- cstrike is used only for the team, not for the method which set a model.
- It explains another ways to set models, read better.

By reading the code you can see the method used, thus inserting into your plugin.
__________________
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 17:39.


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