AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hostages and skins. (https://forums.alliedmods.net/showthread.php?t=100639)

Leon M. 08-16-2009 12:07

Hostages and skins.
 
Hello guys,

I need some help :) . During I'm looking for a solution of my problem I found the "Hostage Model"-plugin by VEN. But I'm not happy with this solution. I hope that exists an easier way to change the hostage models.

I don't want to use the plugin because I cannot change between different skins. I got a new model (1 mdl file) with 3 different bodies and 2 different skins.

1. How I can change the models of the hostages without using of VEN's plugin. (I'm looking for a easy solution)

2. How I can set a skin or a body for the models? I think I must change this values but I'm not sure. (pev_skin, pev_body)

Sorry for my bad english, I hope you understand what I mean.
Many thanks in advance.
Leon

Arkshine 08-16-2009 13:11

Re: Hostages and skins.
 
VEN's plugin is perfectly fine. All you need to add is the keyvalue for the "skin" and "body".

Leon M. 08-16-2009 14:27

Re: Hostages and skins.
 
Thanks for your reply :)

I do not mean to ask a silly question but how and where I could set the body and/or skin? Because I didn't understand VEN's Plugin. :(

I think here, in this part of VEN's code. But what I must add here?
Code:

    if (first_kvd) {
        // KVD contain four data member

        // first is the classname
        set_kvd(GLOBAL_KVD_HANDLE, KV_ClassName, g_hostage_entity)

        // second is the key name
        set_kvd(GLOBAL_KVD_HANDLE, KV_KeyName, g_model_key)

        // third is the key value
        set_kvd(GLOBAL_KVD_HANDLE, KV_Value, g_hostages_models[g_hostage_current])

        // this is used by the game mod, will be set to 1 if the KVD is correct
        set_kvd(GLOBAL_KVD_HANDLE, KV_fHandled, _:false)

        // fire our KVD
        dllfunc(DLLFunc_KeyValue, ent, GLOBAL_KVD_HANDLE)
    }

Can you add an example for me, please? Sorry for my ignorance. ;)

EDIT:
Ohhh man :oops:. I'm so stupid :mrgreen:. Many thanks Arkshine.


Leon


All times are GMT -4. The time now is 15:13.

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