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

Dank Plagen


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Admin Commands       
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 08-17-2016 , 14:00   Dank Plagen
Reply With Quote #1

Commands:
amx_denk <nick> <hp>
amx_denk @ct <hp>
amx_denk @t <hp>

Last edited by Rohanlogs; 06-03-2017 at 18:43. Reason: You are not allowed to attach compiled plugin
Rohanlogs is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 08-17-2016 , 14:34   Re: Dank Plagen
Reply With Quote #2

Quote:
Originally Posted by Rohanlogs View Post
plz no hate
You will probably never receive hate, unless you're asking for trouble. What you are going to get is criticism, so you can improve your coding and make better plugins.

I'll start with something easy. Please indent your plugin properly. I took the liberty to do it for you so you can get an idea of how it can be done.

dank_plagen.sma

>>

PHP Code:
/* Plagen :D */

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Denk Ferst Plagen xD"
#define VERSION "1.0"
#define AUTHOR "taski"

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_concmd("amx_denk""cmd_hp"ADMIN_SLAY"<nick> <hp> ")
}

public 
cmd_hp(idlevelcid)
{
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
        
    
new Arg1[24], Arg2[4]
    
    
read_argv(1Arg123)
    
read_argv(2Arg23)
    
    new 
Health str_to_num(Arg2)
    
    if (
Arg1[0] == '@')
    {
        new 
Team 0
        
        
if (equali(Arg1[1], "CT"))
            
Team 2
        
else if (equali(Arg1[1], "T")) 
            
Team 1
        
        
new players[32], num
        get_players
(playersnum)
        new 
i

        
for (i=0i<numi++)
        {
            if (!
Team)
                
set_user_health(players[1], Health)
            else 
            {
                if (
get_user_team(players[i]) == Team)
                    
set_user_health(players[i], Health)
            }
        }
    } 
    else 
    {
        new 
player cmd_target(idArg10)
        if (!
player)
        {
            
console_print(id"Soz fagit, player %s isn't even here dumbass, fagit!"Arg1)
            return 
PLUGIN_HANDLED
        

        else 
            
set_user_health(playerHealth)
    }
    return 
PLUGIN_HANDLED

This won't guarantee an approval, but make the plugin less painful to read, asides is always good to read a properly indented plugin.

https://forums.alliedmods.net/forumdisplay.php?f=11
https://forums.alliedmods.net/forumdisplay.php?f=83

These forums are good places to learn. If you have any question you can always ask in the Scripting Help sub-forum.

Cheers
__________________
gabuch2 is offline
Rohanlogs
Senior Member
Join Date: Nov 2015
Old 08-17-2016 , 15:22   Re: Dank Plagen
Reply With Quote #3

Quote:
This won't guarantee an approval, but make the plugin less painful to read, asides is always good to read a properly indented plugin.

https://forums.alliedmods.net/forumdisplay.php?f=11
https://forums.alliedmods.net/forumdisplay.php?f=83

These forums are good places to learn. If you have any question you can always ask in the Scripting Help sub-forum.

Cheers
Ty!
Rohanlogs is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 08-17-2016 , 22:14   Re: Dank Plagen
Reply With Quote #4

What a fagit plugin!
__________________
Discord contacts:
I rarely look at private messages here, but I am very active on Discord!
happy_2012 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-20-2016 , 04:42   Re: Dank Plagen
Reply With Quote #5

The funny thing, this is not made by you: https://wiki.alliedmods.net/Intro_to...Admin_Commands
You just copy/pasted Bail's example.

Unapproved.
__________________
HamletEagle 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:56.


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