AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with "set user model" and a hud message. (https://forums.alliedmods.net/showthread.php?t=107666)

vL. 10-28-2009 18:51

Need help with "set user model" and a hud message.
 
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 :)

vL. 11-02-2009 10:36

Re: Help with a Vip plugin.
 
Okay, I got the Connection message working. So I only need the models thing and hud message.

Arkshine 11-02-2009 10:49

Re: Need help with "set user model" and a hud message.
 
http://forums.alliedmods.net/showthread.php?t=106094
http://forums.alliedmods.net/showthread.php?t=69386

vL. 11-02-2009 10:58

Re: Need help with "set user model" and a hud message.
 
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.

Arkshine 11-02-2009 11:36

Re: Need help with "set user model" and a hud message.
 
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.


All times are GMT -4. The time now is 17:39.

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