AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Knife Bonus Help (https://forums.alliedmods.net/showthread.php?t=315083)

lantimilan 03-21-2019 09:52

Knife Bonus Help
 
Hello who can help me i want to remove HUD but when somebody kill with knife to show message just for player who kill not for all i have one .sma

PHP Code:

#include <amxmodx>
#include <cstrike>
#include <cromchat>


#define PLUGIN "Thika Bonus"
#define VERSION "1.0"
#define AUTHOR "Bin!n!"

new g_money

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("DeathMsg""DeathMsg""a")
    
g_money register_cvar ("g_money""2500");
}
public 
DeathMsg()
{
    new 
zabojca read_data(1);
    new 
ofiara read_data(2);
    new 
weapon[32];
    
read_data(4,weapon,31);

    if(
zabojca == ofiara || zabojca == || ofiara == 0)
    return;

    if(
containi(weapon"knife") == -1)
    return;

    if(!
is_user_alive(zabojca))
    return;

    new 
name_zabojca[32], name_ofiara[32], money get_pcvar_num(g_money)
    
get_user_name(zabojcaname_zabojca31);
    
get_user_name(ofiaraname_ofiara31);
    
    
set_hudmessage(25500, -1.00.30, .holdtime 5.0)
    
show_hudmessage(0"%s theri me thike %s"name_zabojcaname_ofiara)
    
    
CC_SendMessage(id"^x01[^x04Thika^x01]^x03: ^x01Te lumte ju keni fituar ^x04 %d$ ^x01per therjen me thike.",money);

    
cs_set_user_money(zabojcacs_get_user_money(zabojca)+money1);



SHIELD755 03-21-2019 10:29

Re: Knife Bonus
 
PHP Code:


#include <amxmodx> 
#include <cstrike> 
#include <cromchat> 


#define PLUGIN "Thika Bonus" 
#define VERSION "1.0" 
#define AUTHOR "Bin!n!" 

new g_money 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_event("DeathMsg""DeathMsg""a"
    
g_money register_cvar ("g_money""2500"); 

public 
DeathMsg(id

    new 
zabojca read_data(1); 
    new 
ofiara read_data(2); 
    new 
weapon[32]; 
    
read_data(4,weapon,31); 

    if(
zabojca == ofiara || zabojca == || ofiara == 0
    return; 

    if(
containi(weapon"knife") == -1
    return; 

    if(!
is_user_alive(zabojca)) 
    return; 

    new 
name_zabojca[32], name_ofiara[32], money get_pcvar_num(g_money
    
get_user_name(zabojcaname_zabojca31); 
    
get_user_name(ofiaraname_ofiara31); 
     
     
///--HUD--REMOVE-///

    ///////set_hudmessage(255, 0, 0, -1.0, 0.30, .holdtime = 5.0) 
    ///////show_hudmessage(0, "%s theri me thike %s", name_zabojca, name_ofiara) 
     

    
CC_SendMessage(id"^x01[^x04Thika^x01]^x03: ^x01Te lumte ju keni fituar ^x04 %d$ ^x01per therjen me thike.",money); 

    
cs_set_user_money(zabojcacs_get_user_money(zabojca)+money1); 



EDIT : fix the cc_sendmessage error

DON KHAN 1 03-21-2019 11:19

Re: Knife Bonus
 
I Think Topic Has Been Solved So Now Put Solved Before The Topic Name

SHIELD755 03-21-2019 11:24

Re: Knife Bonus
 
Quote:

Originally Posted by DON KHAN 1 (Post 2644288)
I Think Topic Has Been Solved So Now Put Solved Before The Topic Name

maybe he got some error , so it depends on him :)

OciXCrom 03-21-2019 15:13

Re: Knife Bonus
 
Or maybe he isn't 24/7 in front of his computer. What kind of a silly comment is that? It's not up to you whether or not the thread is solved.

lantimilan 03-21-2019 15:46

Re: Knife Bonus
 
Quote:

Originally Posted by OciXCrom (Post 2644321)
Or maybe he isn't 24/7 in front of his computer. What kind of a silly comment is that? It's not up to you whether or not the thread is solved.

He not understand shield post wrong something i ask in facebook, after he update code and after this time i solved but somebody look just to make post to comment, thanks bro ;)

thEsp 03-21-2019 16:52

Re: Knife Bonus
 
Quote:

Originally Posted by DON KHAN 1 (Post 2644288)
I Think Topic Has Been Solved So Now Put Solved Before The Topic Name

I Think You Should Learn Spelling Since Not Every Word Starts With Uppercase Letter :D

lantimilan 03-22-2019 15:54

Re: Knife Bonus Help
 
Again i have problem Message again show for all players if some 2 playes kill with knife i see message thika bonus something make problem

thEsp 03-22-2019 16:12

Re: Knife Bonus Help
 
PHP Code:

#include <amxmodx> 
#include <cstrike> 
#include <cromchat> 


#define PLUGIN "Thika Bonus" 
#define VERSION "1.0" 
#define AUTHOR "Bin!n!" 

new g_money 

public plugin_init() 

    
register_plugin(PLUGINVERSIONAUTHOR
    
register_event("DeathMsg""DeathMsg""a"
    
g_money register_cvar ("g_money""2500"); 

public 
DeathMsg() 

    new 
vrasesi read_data(1); 
    new 
viktima read_data(2); 
    new 
weapon[32]; 
    
read_data(4,weapon,31); 

    if(
vrasesi == viktima || vrasesi == || viktima == 0
    return; 

    if(
containi(weapon"knife") == -1
    return; 

    if(!
is_user_alive(vrasesi)) 
    return; 

    new 
name_vrasesi[32], name_viktima[32]
    
get_user_name(vrasesiname_vrasesi31); 
    
get_user_name(viktimaname_viktima31); 
     
    
set_hudmessage(25500, -1.00.30, .holdtime 5.0
    
show_hudmessage(vrasesi"%s theri me thike %s"name_vrasesiname_viktima
     
    
CC_SendMessage(vrasesi"^x01[^x04Thika^x01]^x03: ^x01Te lumte ju keni fituar ^x04 %d$ ^x01per therjen me thike.",get_pcvar_num(g_money)); 

    
cs_set_user_money(vrasesics_get_user_money(vrasesi)+get_pcvar_num(g_money), 1); 




All times are GMT -4. The time now is 04:24.

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