AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP]DeathMsg problem?? (https://forums.alliedmods.net/showthread.php?t=108829)

byetovice 11-10-2009 01:28

[HELP]DeathMsg problem??
 
All of code :
PHP Code:

/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <engine>
#include <fun>
#include <cstrike>
#include <Vexd_Utilities>
new bool:Has_yd[33];
#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "author"

public plugin_init() {
 
register_plugin(PLUGINVERSIONAUTHOR)
 
register_clcmd("say /golden","nade_event")
 
register_cvar("amx_golden","1")
 
register_event("Damage","Damage_event","b")
 
}
public 
plugin_precache()
{
precache_model("models/v_yadigar.mdl")
}
public 
nade_event(id)
{
if(
get_cvar_num("amx_golden"))
{
if(
cs_get_user_team(id)==CS_TEAM_T)
{
if(
get_user_frags(id)>=1)
{
 
set_task(0.1,"nadening",id,"",0,"b")
 
set_user_frags(id,get_user_frags(id)-1)
 
Has_yd[id]=true;
 
client_print(id,print_center,"GoldeN knife satin aldiniz[Yanmaz-yapismaz + 2yil garantiSiz]")
 
}
}
}
 
}

public 
nadening(id)
{

new 
Weapon=get_user_weapon(id)
if(
Weapon==CSW_KNIFE)
{
Entvars_Set_String(idEV_SZ_viewmodel,"models/v_yadigar.mdl")
}
}
public 
Damage_event(id)
{
 new 
weap,bodypart,attacker get_user_attacker(id,weap,bodypart);
 if(
attacker!=0)
 {
  if(
attacker!=id)
  {
   if(
weap==CSW_KNIFE && Has_yd[attacker])
   {
    if(
get_user_health(id)<=35)
    {
     
user_kill(id1)
     
set_user_frags(id,get_user_frags(id)+1)
     
     
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_ONCE)
     
message_begin(MSG_ALLget_user_msgid("DeathMsg"), {000}, 0)
     
write_byte(attacker)
     
write_byte(id)
     
write_byte(0)         
     
write_string("knife")
     
message_end()
     
     
message_begin(MSG_ALL,get_user_msgid("ScoreInfo"));
     
write_byte(attacker);
     
write_short(get_user_frags(attacker));
     
write_short(get_user_deaths(attacker));
     
write_short(0);
     
write_short(get_user_team(attacker));
     
message_end();
   
     
message_begin(MSG_ALL,get_user_msgid("ScoreInfo"));
     
write_byte(id);
     
write_short(get_user_frags(id));
     
write_short(get_user_deaths(id));
     
write_short(0);
     
write_short(get_user_team(id));
     
message_end();
    }
    else
    {
     
set_user_health(id,get_user_health(id)-35)
    }
   }
  }
 }
}
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 

my problem is :
[IMG]http://img5.**************/img5/1552/problemvk.jpg[/IMG]
what should i do?

byetovice 11-10-2009 02:03

Re: [HELP]DeathMsg problem??
 
who can help me??

byetovice 11-10-2009 03:13

Re: [HELP]DeathMsg problem??
 
???

unnyquee 11-10-2009 03:27

Re: [HELP]DeathMsg problem??
 
What should I understand from this topic?
Post your problem, in details :grrr:

byetovice 11-10-2009 03:34

Re: [HELP]DeathMsg problem??
 
sorry.my english is bad...
if you look at photo, you will understand the problem..
[IMG]http://img5.**************/img5/1552/problemvk.jpg[/IMG]

byetovice 11-10-2009 03:54

Re: [HELP]DeathMsg problem??
 
???

unnyquee 11-10-2009 03:54

Re: [HELP]DeathMsg problem??
 
No.. I DON'T understand the problem..

Oh yeah.. another Lordshiva :crab: :crab: :crab:

I think what are you tryin' to say is that it displays that worldspawn death before knife-kill?
Simple: end the Damage_event public with PLUGIN_HANDLED;

byetovice 11-10-2009 04:16

Re: [HELP]DeathMsg problem??
 
there are 3 deathmessages :
xxx killed by xxxx
xxx killed by xxxx
xxx killed by xxxx

unnyquee 11-10-2009 04:25

Re: [HELP]DeathMsg problem??
 
So what?

byetovice 11-10-2009 04:42

Re: [HELP]DeathMsg problem??
 
fixed ..
user_kill takes a damage to player
so plugin creates a deathmessage,,
then..my plugin takes extra damage to player..
and plugin creates a deathmessage again..


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

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