AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Reaplce knfie with medickit (https://forums.alliedmods.net/showthread.php?t=85130)

Sid89 02-06-2009 03:43

Reaplce knfie with medickit
 
Sorry for my bad english!

Hi, i'm new to amxx scripting, so i want ask you to help me please, i want to reaplce knife with medickit. My probles is that i replaced the model, but i can't get it right, to heal player, but not to kill him :))

I tried to block attack and attack2, but then animathion don't play...

Thank you.

hleV 02-06-2009 06:36

Re: Reaplce knfie with medickit
 
Can you upload the medickit model?

Sid89 02-06-2009 06:41

Re: Reaplce knfie with medickit
 
Were to upload?

If it helps, it's from Sven Coop mod, but i changed sequences, like in knife...

PHP Code:

$sequence "idle" "idle" fps 60 loop 
$sequence 
"holster" "holster" fps 0 
$sequence 
"holster" "holster" fps 0
$sequence 
"draw" "draw" fps 60
$sequence 
"longuse" "longuse" fps 60 
$sequence 
"longidle" "longidle" fps 60
$sequence 
"shortuse" "shortuse" fps 60 
$sequence 
"shortuse" "shortuse" fps 60 


SnoW 02-06-2009 08:46

Re: Reaplce knfie with medickit
 
Quote:

Originally Posted by Sid89 (Post 756734)
Were to upload?

hleV meant upload the medickit model here(to the forums), "Manage Attachments" button.

Sid89 02-06-2009 08:53

Re: Reaplce knfie with medickit
 
1 Attachment(s)
Sorry, i'm noob ^^

Here it is... :wink:

tuty 02-06-2009 12:49

Re: Reaplce knfie with medickit
 
that model is from tfc? :mrgreen::mrgreen::mrgreen::mrgreen::mrgreen:

ConnorMcLeod 02-06-2009 14:37

Re: Reaplce knfie with medickit
 
This is a way, but, you should create a specific folder in models/ folder, with for example the name of your plugin, as you have changed animations of the model.

PHP Code:

#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define PLUGIN "Knife Model"
#define AUTHOR "ConnorMcLeod"
#define VERSION "0.0.1"

#define    m_pPlayer                41

new g_iVModel

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHam(Ham_Item_Deploy"weapon_knife""Knife_Deploy"1)
    
g_iVModel engfunc(EngFunc_AllocString"models/v_medickit.mdl")
}

public 
plugin_precache()
{
    
precache_model("models/v_medickit.mdl")
}

public 
Knife_DeployiEnt )
{
    
set_pevget_pdata_cbase(iEntm_pPlayer4), pev_viewmodelg_iVModel)



Arkshine 02-06-2009 14:52

Re: Reaplce knfie with medickit
 
Humm I will try to do it. :mrgreen:

Sid89 02-07-2009 03:37

Re: Reaplce knfie with medickit
 
Okay, but what about user healing?

As i see from code, it only changes model, am i right?


All times are GMT -4. The time now is 01:40.

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