Raised This Month: $305 Target: $400
 76%   Almost there!

Noob Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
S1ncer3ly
New Member
Join Date: May 2021
Location: INDIA
Old 08-22-2021 , 17:05   Noob Plugin
Reply With Quote #1

NOOB PLUGIN
_____________________________________________ ______________________________________
Its a free humble plugin request !
The concept is:
✰ If a player is dying continously for 10 rounds without getting kills the HUD msg shows
Poor Noob <playerid> died 10 time in a row!

_____________________________________________ ______________________________________

If u feel like working on this plugin first of all i want to Thankyou in advance

Discord: S1ncer3ly#9866
Steam: https://steamcommunity.com/id/_SincerelyYourDad_/
Discord Community: https://discord.gg/Phqjd28ACz

_____________________________________________ ______________________________________
~Thankyou
S1ncer3ly is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-22-2021 , 18:00   Re: Noob Plugin
Reply With Quote #2

This will show a HUD if a player reaches 10+ deaths in a row (excluding suicides/worldspawn deaths), displaying for each kill 10 and beyond. Untested
PHP Code:

#include <amxmodx>
#include <hamsandwich>

#define MAX_PLAYERS 32

#define IsPlayer(%1) (1<=%1<=MAX_PLAYERS)

new g_iKilledMAX_PLAYERS ];

public 
plugin_init()
{
    
RegisterHamHam_Killed "player" "HamKilled" );
}

public 
client_connectid )
{
    
g_iKilledid ] = 0;
}

public 
HamKillediKilled iKiller bShouldGib)
{
    if ( 
IsPlayeriKiller ) )
    {
        
g_iKillediKiller ] = 0;
    
        if ( ( 
iKiller != iKilled ) && ( ++g_iKillediKilled ] >= 10 ) )
        {
            new 
szName32 ];
            
get_user_nameiKilled szName charsmaxszName ) );
            
set_hudmessage212 255 255 0.05 0.35 0.0 5.0 );
            
show_hudmessage"Poor Noob %s died %d times in a row!" szName g_iKillediKilled ] );
        }
    }

__________________

Last edited by Bugsy; 08-23-2021 at 12:05.
Bugsy is offline
Old 08-22-2021, 20:28
S1ncer3ly
This message has been deleted by S1ncer3ly.
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-23-2021 , 09:41   Re: Noob Plugin
Reply With Quote #3

iKiller could be a world entity and then this will throw an error => index out of bounds


For example if the player dies from an entity( trigger_hurt )
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-23-2021 at 09:43.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-23-2021 , 11:37   Re: Noob Plugin
Reply With Quote #4

Quote:
Originally Posted by Natsheh View Post
iKiller could be a world entity and then this will throw an error => index out of bounds


For example if the player dies from an entity( trigger_hurt )
World entity is 0, no? Where would I get an index out of bounds? g_Killed[] has a range of 0 to 32.
__________________
Bugsy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 08-23-2021 , 11:52   Re: Noob Plugin
Reply With Quote #5

No an entity ( entity > 32 ) from the world, not the world.
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 08-23-2021 at 11:53.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 08-23-2021 , 12:05   Re: Noob Plugin
Reply With Quote #6

Roger, updated
__________________
Bugsy is offline
Reply


Thread Tools
Display Modes

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 01:40.


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