Raised This Month: $51 Target: $400
 12% 

Score + Death


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Cirovic
Senior Member
Join Date: Sep 2019
Old 03-22-2020 , 20:34   Score + Death
Reply With Quote #1

Hello i need 2 plugins

1.Players cannot drop any weapons
2.Players cant have deaths on score( so if u die u wont get death score)
Cirovic is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-23-2020 , 07:46   Re: Score + Death
Reply With Quote #2

This should help u with your weapon drop: https://forums.alliedmods.net/showth...=49323?t=49323

And for the deaths, this should do the trick.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "No Death Score"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_event("DeathMsg""eDeath""a");
}

public 
eDeath()
{
    
cs_set_user_deaths(read_data(2), 0);

__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Cirovic
Senior Member
Join Date: Sep 2019
Old 03-23-2020 , 08:50   Re: Score + Death
Reply With Quote #3

Quote:
Originally Posted by Napoleon_be View Post
This should help u with your weapon drop: https://forums.alliedmods.net/showth...=49323?t=49323

And for the deaths, this should do the trick.

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "No Death Score"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
register_event("DeathMsg""eDeath""a");
}

public 
eDeath()
{
    
cs_set_user_deaths(read_data(2), 0);


It works for weapon drop, but for your plugin when some1 die he got only 1 death.. you can die 15 times and still only 1 deaths, it need to be zero deaths
Cirovic is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-23-2020 , 09:53   Re: Score + Death
Reply With Quote #4

It's 0, but the problem is the "cs_set_user_deaths" doesn't refresh the scoreboard. The frags need to be set too.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-23-2020 , 10:46   Re: Score + Death
Reply With Quote #5

Yea my bad, should be fixed

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

#define PLUGIN "No Death Score"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"


public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
RegisterHam(Ham_Killed"player""PostPlayerKilled"1);
}

public 
PostPlayerKilled(iVictimiAttackeriShouldGib)
{
    
cs_set_user_deaths(iVictim0);
    
set_user_frags(iVictimget_user_frags(iVictim));

__________________

Last edited by Napoleon_be; 03-23-2020 at 11:27.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Cirovic
Senior Member
Join Date: Sep 2019
Old 03-23-2020 , 11:18   Re: Score + Death
Reply With Quote #6

same...
Cirovic is offline
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 03-23-2020 , 11:27   Re: Score + Death
Reply With Quote #7

Try again, updated my code. Just used Ham_Killed instead as i suspect DeathMsg isn't post called, not sure though.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Cirovic
Senior Member
Join Date: Sep 2019
Old 03-23-2020 , 12:08   Re: Score + Death
Reply With Quote #8

now doesn't work
Cirovic is offline
Xalus
Veteran Member
Join Date: Dec 2009
Location: Belgium
Old 03-23-2020 , 12:18   Re: Score + Death
Reply With Quote #9

Try this:
(Not sure it will work, else we'll need to send everyone client' deaths)

PHP Code:
#include <amxmodx>
#include <engine>

public plugin_init()
{
  
register_message(get_user_msgid("ScoreInfo"), "client_scoreinfo")
}

public 
client_scoreinfo(const MsgID, const MsgDest, const MsgEnt)
{
    
/*
    byte    PlayerID
    short    Score
    short    Deaths
    short    ClassID
    short    TeamID
    */
  
set_msg_arg_int(3ARG_SHORT0)

__________________
Retired.
Xalus is offline
fakenik
Junior Member
Join Date: Mar 2013
Old 03-31-2020 , 08:41   Re: Score + Death
Reply With Quote #10

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <cstrike>

#define PLUGIN "No Death Score"
#define VERSION "1.0"
#define AUTHOR "NapoleoN#"


public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR);
    
    register_event("DeathMsg", "eDeath", "a");
}

public eDeath()
{
    cs_set_user_deaths(read_data(2), -1);
}

Last edited by fakenik; 03-31-2020 at 08:42.
fakenik 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 18:06.


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