Raised This Month: $ Target: $400
 0% 

[REQ] help to customize a plugin!!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
abdeslemkh
Member
Join Date: Feb 2010
Old 03-11-2010 , 05:42   [REQ] help to customize a plugin!!
Reply With Quote #1

hi all and thx for seeing my post!!
first I woold like to say that i don't know any thing in changing plugins!!
but when i puted "HeGrenade_SndDmg_Spawn" two thinks doesn't please me!!
it's the chat! message! when he is damaged or when he is killed by a generade!!
and when it gives to player thinks that rdueces the realism of the game!!
please!! i woold a modification that remove the chat and thinks donate to the player
I'm verry verry sory for my english!!
Code:
/*
        I'm hurt! HE make me can't listen for while!

        Extra stuff for Grenade Enhancer by anakin_cstrike
        
        This plugins will play sound when HE throw and player get
        damage from HE. Hurt Sound will be played.
        
        More real style HE damage like Half-Life 2 and Call of Duty 4
        Download: http://forums.alliedmods.net/showthread.php?p=651536
        
        © Copyright 2008 ANiME clan.
        Visit: http://ilham92-cc-sakura.webs/
    Under License GNU
    
    English help by: [ANiME|ADMiN][5hp-Evolution]
    Created by: [ANiME|ADMiN][Ilham Sakura] aka ilham92-cc-sakura
    Scripting Help: SnoW (Damage Event)
    Scripting Help: Tuty (Stock)

*/

#include <amxmodx>
#include <fakemeta>
#include <csx>

#define SND1 "player/player_listen.wav"
#define SND2 "player/breathe1noloop.wav"
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new amx_pcvar_0;

public plugin_init()
{
    register_plugin("HE Player Damage Snd", "1.0","ilham92-cc-sakura");
    amx_pcvar_0 = register_cvar("he_hit_respawn","1");
}
public plugin_precache()
{
    precache_sound(SND1);
    precache_sound(SND2);
}
public client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
{
    if(get_pcvar_num(amx_pcvar_0) != 0 && wpnindex != CSW_HEGRENADE)
        return PLUGIN_HANDLED;
    
    new sound1[129];
    copy(sound1,128,SND1);

    if(contain(sound1,".wav"))
    {
        replace(sound1,128,".wav","");
        client_cmd(victim, "spk %s",sound1);
    }

    new sound2[131];
    copy(sound2,130,SND2);

    if(contain(sound2,".wav"))
    {
        replace(sound1,130,".wav","");
        client_cmd(victim, "spk %s",sound2);
    }

    new pl_name[32];
    get_user_name(victim,pl_name, 31);
    
    client_cmd(victim, "say ^"Damn it! HE Grenade Hit Me!^"");
    client_print(0, print_chat, "[Grenade]: At who trow grenade. %s! it is time for a payback",pl_name);
    
    if(get_user_team(victim) == 1)
    {
        fm_give_item(victim, "weapon_knife");
        fm_give_item(victim, "weapon_mp5navy");
        fm_give_item(victim, "item_kevlar");
        fm_give_item(victim, "ammo_9mm");
        fm_give_item(victim, "ammo_9mm");
        fm_give_item(victim, "ammo_9mm");
        fm_give_item(victim, "ammo_9mm");
    }
    if(!is_user_alive(victim))
    {
        set_task(0.6,"respawnagain",victim);
        client_print(0, print_chat, "[Grenade]: HE kill %s and respwan.",pl_name);
        client_cmd(victim, "say ^"I will get you for my revenge!^"");
    }
    return PLUGIN_CONTINUE;
}
public respawnagain(victim)
{
    fm_cs_user_spawn(victim);
}
stock fm_cs_user_spawn(index)
{
    set_pev(index, pev_deadflag, DEAD_RESPAWNABLE);
    dllfunc(DLLFunc_Spawn, index);
    set_pev(index, pev_iuser1, 0);

    return 1;
}
stock fm_give_item(index, const item[])
{
    if (!equal(item, "weapon_", 7) && !equal(item, "ammo_", 5) && !equal(item, "item_", 5) && !equal(item, "tf_weapon_", 10))
        return 0;

    new ent = fm_create_entity(item);

    if (!pev_valid(ent))
        return 0;

    new Float:origin[3];
    pev(index, pev_origin, origin);
    set_pev(ent, pev_origin, origin);
    set_pev(ent, pev_spawnflags, pev(ent, pev_spawnflags) | SF_NORESPAWN);
    dllfunc(DLLFunc_Spawn, ent);

    new save = pev(ent, pev_solid);
    dllfunc(DLLFunc_Touch, ent, index);

    if (pev(ent, pev_solid) != save)
        return ent;

    engfunc(EngFunc_RemoveEntity, ent);
    return -1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
thank you for helping me!!
abdeslemkh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-11-2010 , 07:22   Re: [REQ] help to customize a plugin!!
Reply With Quote #2

This is the version without the chat messages. i hope this is what you want cause i can't really figure out what you asked for
PHP Code:
/*
        I'm hurt! HE make me can't listen for while!

        Extra stuff for Grenade Enhancer by anakin_cstrike
        
        This plugins will play sound when HE throw and player get
        damage from HE. Hurt Sound will be played.
        
        More real style HE damage like Half-Life 2 and Call of Duty 4
        Download: http://forums.alliedmods.net/showthread.php?p=651536
        
        © Copyright 2008 ANiME clan.
        Visit: http://ilham92-cc-sakura.webs/
    Under License GNU
    
    English help by: [ANiME|ADMiN][5hp-Evolution]
    Created by: [ANiME|ADMiN][Ilham Sakura] aka ilham92-cc-sakura
    Scripting Help: SnoW (Damage Event)
    Scripting Help: Tuty (Stock)

*/

#include <amxmodx>
#include <fakemeta>
#include <csx>

#define SND1 "player/player_listen.wav"
#define SND2 "player/breathe1noloop.wav"
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new amx_pcvar_0;

public 
plugin_init()
{
    
register_plugin("HE Player Damage Snd""1.0","ilham92-cc-sakura");
    
amx_pcvar_0 register_cvar("he_hit_respawn","1");
}
public 
plugin_precache()
{
    
precache_sound(SND1);
    
precache_sound(SND2);
}
public 
client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
{
    if(
get_pcvar_num(amx_pcvar_0) != && wpnindex != CSW_HEGRENADE)
        return 
PLUGIN_HANDLED;
    
    new 
sound1[129];
    
copy(sound1,128,SND1);

    if(
contain(sound1,".wav"))
    {
        
replace(sound1,128,".wav","");
        
client_cmd(victim"spk %s",sound1);
    }

    new 
sound2[131];
    
copy(sound2,130,SND2);

    if(
contain(sound2,".wav"))
    {
        
replace(sound1,130,".wav","");
        
client_cmd(victim"spk %s",sound2);
    }

    new 
pl_name[32];
    
get_user_name(victim,pl_name31);
    
    
//client_cmd(victim, "say ^"Damn it! HE Grenade Hit Me!^"");
    //client_print(0, print_chat, "[Grenade]: At who trow grenade. %s! it is time for a payback",pl_name);
    
    
if(get_user_team(victim) == 1)
    {
        
fm_give_item(victim"weapon_knife");
        
fm_give_item(victim"weapon_mp5navy");
        
fm_give_item(victim"item_kevlar");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
    }
    if(!
is_user_alive(victim))
    {
        
set_task(0.6,"respawnagain",victim);
        
//client_print(0, print_chat, "[Grenade]: HE kill %s and respwan.",pl_name);
        //client_cmd(victim, "say ^"I will get you for my revenge!^"");
    
}
    return 
PLUGIN_CONTINUE;
}
public 
respawnagain(victim)
{
    
fm_cs_user_spawn(victim);
}
stock fm_cs_user_spawn(index)
{
    
set_pev(indexpev_deadflagDEAD_RESPAWNABLE);
    
dllfunc(DLLFunc_Spawnindex);
    
set_pev(indexpev_iuser10);

    return 
1;
}
stock fm_give_item(index, const item[])
{
    if (!
equal(item"weapon_"7) && !equal(item"ammo_"5) && !equal(item"item_"5) && !equal(item"tf_weapon_"10))
        return 
0;

    new 
ent fm_create_entity(item);

    if (!
pev_valid(ent))
        return 
0;

    new 
Float:origin[3];
    
pev(indexpev_originorigin);
    
set_pev(entpev_originorigin);
    
set_pev(entpev_spawnflagspev(entpev_spawnflags) | SF_NORESPAWN);
    
dllfunc(DLLFunc_Spawnent);

    new 
save pev(entpev_solid);
    
dllfunc(DLLFunc_Touchentindex);

    if (
pev(entpev_solid) != save)
        return 
ent;

    
engfunc(EngFunc_RemoveEntityent);
    return -
1;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
abdeslemkh
Member
Join Date: Feb 2010
Old 03-11-2010 , 07:45   Re: [REQ] help to customize a plugin!!
Reply With Quote #3

is it the same code?? because this code is alrady existing
PHP Code:
  fm_give_item(victim"weapon_knife");
        
fm_give_item(victim"weapon_mp5navy");
        
fm_give_item(victim"item_kevlar");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm"); 
abdeslemkh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-11-2010 , 07:51   Re: [REQ] help to customize a plugin!!
Reply With Quote #4

yes that is the same code, i didnt get your question very well, i though you wanted to remove the chat messages.
Could you make a list of everything you want. so i could do my best to help you out?

i read your question again and if i'm right you want:

1: no chat messages
2: no given weapons to the victim

so here is the code without given weapons and chat messages:
PHP Code:
/*
        I'm hurt! HE make me can't listen for while!

        Extra stuff for Grenade Enhancer by anakin_cstrike
        
        This plugins will play sound when HE throw and player get
        damage from HE. Hurt Sound will be played.
        
        More real style HE damage like Half-Life 2 and Call of Duty 4
        Download: http://forums.alliedmods.net/showthread.php?p=651536
        
        © Copyright 2008 ANiME clan.
        Visit: http://ilham92-cc-sakura.webs/
    Under License GNU
    
    English help by: [ANiME|ADMiN][5hp-Evolution]
    Created by: [ANiME|ADMiN][Ilham Sakura] aka ilham92-cc-sakura
    Scripting Help: SnoW (Damage Event)
    Scripting Help: Tuty (Stock)

*/

#include <amxmodx>
#include <fakemeta>
#include <csx>

#define SND1 "player/player_listen.wav"
#define SND2 "player/breathe1noloop.wav"
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new amx_pcvar_0;

public 
plugin_init()
{
    
register_plugin("HE Player Damage Snd""1.0","ilham92-cc-sakura");
    
amx_pcvar_0 register_cvar("he_hit_respawn","1");
}
public 
plugin_precache()
{
    
precache_sound(SND1);
    
precache_sound(SND2);
}
public 
client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
{
    if(
get_pcvar_num(amx_pcvar_0) != && wpnindex != CSW_HEGRENADE)
        return 
PLUGIN_HANDLED;
    
    new 
sound1[129];
    
copy(sound1,128,SND1);

    if(
contain(sound1,".wav"))
    {
        
replace(sound1,128,".wav","");
        
client_cmd(victim"spk %s",sound1);
    }

    new 
sound2[131];
    
copy(sound2,130,SND2);

    if(
contain(sound2,".wav"))
    {
        
replace(sound1,130,".wav","");
        
client_cmd(victim"spk %s",sound2);
    }

    new 
pl_name[32];
    
get_user_name(victim,pl_name31);
     
    if(!
is_user_alive(victim))
    {
        
set_task(0.6,"respawnagain",victim);
    }
    return 
PLUGIN_CONTINUE;
}
public 
respawnagain(victim)
{
    
fm_cs_user_spawn(victim);
}
stock fm_cs_user_spawn(index)
{
    
set_pev(indexpev_deadflagDEAD_RESPAWNABLE);
    
dllfunc(DLLFunc_Spawnindex);
    
set_pev(indexpev_iuser10);

    return 
1;
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 03-11-2010 at 07:57.
drekes is offline
Send a message via MSN to drekes
abdeslemkh
Member
Join Date: Feb 2010
Old 03-11-2010 , 10:31   Re: [REQ] help to customize a plugin!!
Reply With Quote #5

Quote:
Originally Posted by drekes View Post
yes that is the same code, i didnt get your question very well, i though you wanted to remove the chat messages.
Could you make a list of everything you want. so i could do my best to help you out?

i read your question again and if i'm right you want:

1: no chat messages
2: no given weapons to the victim

so here is the code without given weapons and chat messages:
PHP Code:
/*
        I'm hurt! HE make me can't listen for while!

        Extra stuff for Grenade Enhancer by anakin_cstrike
        
        This plugins will play sound when HE throw and player get
        damage from HE. Hurt Sound will be played.
        
        More real style HE damage like Half-Life 2 and Call of Duty 4
        Download: http://forums.alliedmods.net/showthread.php?p=651536
        
        © Copyright 2008 ANiME clan.
        Visit: http://ilham92-cc-sakura.webs/
    Under License GNU
    
    English help by: [ANiME|ADMiN][5hp-Evolution]
    Created by: [ANiME|ADMiN][Ilham Sakura] aka ilham92-cc-sakura
    Scripting Help: SnoW (Damage Event)
    Scripting Help: Tuty (Stock)

*/

#include <amxmodx>
#include <fakemeta>
#include <csx>

#define SND1 "player/player_listen.wav"
#define SND2 "player/breathe1noloop.wav"
#define fm_create_entity(%1) engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, %1))

new amx_pcvar_0;

public 
plugin_init()
{
    
register_plugin("HE Player Damage Snd""1.0","ilham92-cc-sakura");
    
amx_pcvar_0 register_cvar("he_hit_respawn","1");
}
public 
plugin_precache()
{
    
precache_sound(SND1);
    
precache_sound(SND2);
}
public 
client_damage(attacker,victim,damage,wpnindex,hitplace,TA)
{
    if(
get_pcvar_num(amx_pcvar_0) != && wpnindex != CSW_HEGRENADE)
        return 
PLUGIN_HANDLED;
    
    new 
sound1[129];
    
copy(sound1,128,SND1);

    if(
contain(sound1,".wav"))
    {
        
replace(sound1,128,".wav","");
        
client_cmd(victim"spk %s",sound1);
    }

    new 
sound2[131];
    
copy(sound2,130,SND2);

    if(
contain(sound2,".wav"))
    {
        
replace(sound1,130,".wav","");
        
client_cmd(victim"spk %s",sound2);
    }

    new 
pl_name[32];
    
get_user_name(victim,pl_name31);
     
    if(!
is_user_alive(victim))
    {
        
set_task(0.6,"respawnagain",victim);
    }
    return 
PLUGIN_CONTINUE;
}
public 
respawnagain(victim)
{
    
fm_cs_user_spawn(victim);
}
stock fm_cs_user_spawn(index)
{
    
set_pev(indexpev_deadflagDEAD_RESPAWNABLE);
    
dllfunc(DLLFunc_Spawnindex);
    
set_pev(indexpev_iuser10);

    return 
1;
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/ 
my friend thank you for helping me!!
the messages are:
"Damn it! HE Grenade Hit Me!
[Grenade]: At who trow grenade. %s! it is time for a payback
[Grenade]: HE kill %s and respwan.
I will get you for my revenge!"
that i don't like to be sent by the plugin
this is the first think
the second is arms donate to the player after he is hitted by a generage and i think that is this code who is responsible

PHP Code:
fm_give_item(victim"weapon_knife");
        
fm_give_item(victim"weapon_mp5navy");
        
fm_give_item(victim"item_kevlar");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
        
fm_give_item(victim"ammo_9mm");
    } 
that also i don't like to do it!!
in the end my objectiv is only the sound of the player!!and i want to remove arms donate to the victim and the messages!!
thank you!!!!
abdeslemkh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-11-2010 , 10:53   Re: [REQ] help to customize a plugin!!
Reply With Quote #6

So the plugin works fine the way it is now?
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
abdeslemkh
Member
Join Date: Feb 2010
Old 03-11-2010 , 13:54   Re: [REQ] help to customize a plugin!!
Reply With Quote #7

my problem is: i don't like that the plugin send messages!!
and i dont like that the plugin give arms or items to victims
so i need a modification for this plugin to remove the messages ande armes given to victims
abdeslemkh is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-11-2010 , 14:59   Re: [REQ] help to customize a plugin!!
Reply With Quote #8

then you should use the last version i posted.
No given arms and no messages.
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
abdeslemkh
Member
Join Date: Feb 2010
Old 03-11-2010 , 15:25   Re: [REQ] help to customize a plugin!!
Reply With Quote #9

thank you it works very good!! thank youu
hope to help me again here !!

Last edited by abdeslemkh; 03-11-2010 at 15:30.
abdeslemkh 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 08:36.


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