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

[ANY]Simple Suicide plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author
killjoy64
AlliedModders Donor
Join Date: Apr 2012
Location: 81.773644,-46.933594
Plugin ID:
3491
Plugin Version:
2.0.1
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    By typing !kill or /kill, a player can easily kill him/herself.
    Old 01-28-2013 , 10:26   [ANY]Simple Suicide plugin
    Reply With Quote #1

    My first plugin, so go easy on me. I made it for my achievement server because alot of people get stuck and dont know how to use console.

    I made this for Fun/surf/achievement ect... servers that have players that dont know how to use the console even tho its a few steps.


    Credits:
    badmanrider for the idea of this plugin
    and thank you to Azelphur for helping me clean up my plugin.

    Changelog
    Code:
    1.0.0 initial release
    
    1.1.0 took out requirements
    
    2.0.0 major cleanup and efficiency of code
    
    2.0.1 fixed console error
    *Important* Delete the previous version of this plugin called "killme"
    If i did anything wrong, or i need more info or something, just reply.
    again, my first plugin
    Attached Files
    File Type: sp Get Plugin or Get Source (simplesuicide.sp - 1538 views - 961 Bytes)
    __________________

    Last edited by killjoy64; 01-28-2013 at 23:07. Reason: new version
    killjoy64 is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 01-28-2013 , 11:06   Re: [ANY]Simple Suicide plugin
    Reply With Quote #2

    You said it requires sdkhooks and colors, but it doesn't...

    Also, your code has a few errors... You have if(IsValidClient(1) and IsPlayerAlive(1) when it should be (client) (line 40)

    And you over used {}'s where they aren't needed.

    Also, is your public IsValidClient(client) correct (line 24)? I don't use that style so I don't know. I just use if (client <= 0 || client > MaxClients)

    And a word correction... your already dead should be you're already dead but that's because I'm an ass
    __________________
    View my Plugins | Donate

    Last edited by TnTSCS; 01-28-2013 at 11:08.
    TnTSCS is offline
    killjoy64
    AlliedModders Donor
    Join Date: Apr 2012
    Location: 81.773644,-46.933594
    Old 01-28-2013 , 11:15   Re: [ANY]Simple Suicide plugin
    Reply With Quote #3

    Quote:
    Originally Posted by TnTSCS View Post
    You said it requires sdkhooks and colors, but it doesn't...

    Also, your code has a few errors... You have if(IsValidClient(1) and IsPlayerAlive(1) when it should be (client) (line 40)

    And you over used {}'s where they aren't needed.

    Also, is your public IsValidClient(client) correct (line 24)? I don't use that style so I don't know. I just use if (client <= 0 || client > MaxClients)

    And a word correction... your already dead should be you're already dead but that's because I'm an ass
    Im still learning , could you explain where i over used {}'s and what to change (IsValidClient(1) and IsPlayerAlive(1) to.
    __________________
    killjoy64 is offline
    raygius
    Junior Member
    Join Date: Jul 2012
    Old 01-28-2013 , 11:41   Re: [ANY]Simple Suicide plugin
    Reply With Quote #4

    You could add different kind of deaths to it. Like incineration or vaporization, which aren't available to the console. That would attract a few more owners.
    raygius is offline
    killjoy64
    AlliedModders Donor
    Join Date: Apr 2012
    Location: 81.773644,-46.933594
    Old 01-28-2013 , 12:27   Re: [ANY]Simple Suicide plugin
    Reply With Quote #5

    Quote:
    Originally Posted by raygius View Post
    You could add different kind of deaths to it. Like incineration or vaporization, which aren't available to the console. That would attract a few more owners.
    That sounds like a great idea, as soon as i learn how its going in, (hopefully wont be long)
    __________________
    killjoy64 is offline
    RedSword
    SourceMod Plugin Approver
    Join Date: Mar 2006
    Location: Quebec, Canada
    Old 01-28-2013 , 22:46   Re: [ANY]Simple Suicide plugin
    Reply With Quote #6

    Typing that command in server-console would cause an error.

    QQ@Azelphur

    EDIT after below post : Approved.
    __________________
    My plugins :
    Red Maze
    Afk Bomb
    RAWR (per player/rounds Awp Restrict.)
    Kill Assist
    Be Medic

    You can also Donate if you appreciate my work

    Last edited by RedSword; 01-28-2013 at 23:57.
    RedSword is offline
    killjoy64
    AlliedModders Donor
    Join Date: Apr 2012
    Location: 81.773644,-46.933594
    Old 01-28-2013 , 23:07   Re: [ANY]Simple Suicide plugin
    Reply With Quote #7

    Quote:
    Originally Posted by RedSword View Post
    Typing that command in server-console would cause an error.

    QQ@Azelphur
    Fixed!
    __________________
    killjoy64 is offline
    killjoy64
    AlliedModders Donor
    Join Date: Apr 2012
    Location: 81.773644,-46.933594
    Old 01-29-2013 , 13:45   Re: [ANY]Simple Suicide plugin
    Reply With Quote #8

    Quote:
    Originally Posted by TnTSCS View Post
    You said it requires sdkhooks and colors, but it doesn't...

    Also, your code has a few errors... You have if(IsValidClient(1) and IsPlayerAlive(1) when it should be (client) (line 40)

    And you over used {}'s where they aren't needed.

    Also, is your public IsValidClient(client) correct (line 24)? I don't use that style so I don't know. I just use if (client <= 0 || client > MaxClients)

    And a word correction... your already dead should be you're already dead but that's because I'm an ass
    Fixed this yesterday, thank you.
    __________________
    killjoy64 is offline
    B3none
    AlliedModders Donor
    Join Date: Oct 2016
    Location: United Kingdom
    Old 05-04-2019 , 06:10   Re: [ANY]Simple Suicide plugin
    Reply With Quote #9

    PHP Code:
    #include <sourcemod>
    #include <sdktools>

    #pragma semicolon 1
    #pragma newdecls required

    #define MESSAGE_PREFIX "\x04[Server]\x01"

    public Plugin myinfo =
    {
        
    name "Killme",
        
    author "killjoy",
        
    description "A simple way for players to die...",
        
    version "2.1.0",
        
    url "http://www.epic-nation.com"
    };
     
    public 
    void OnPluginStart()
    {
        
    RegConsoleCmd("sm_kill"Command_killme); 
    }

    public 
    Action Command_killme(int clientint args)
    {   
        if(!
    client)
        {
            
    ReplyToCommand(client"[Error] You cannot run this command from server console");
            return 
    Plugin_Handled;
        }
        
        if(!
    IsPlayerAlive(client))
        {
            
    ReplyToCommand(client"%s \x05Last time i checked, your already dead."MESSAGE_PREFIX);
            return 
    Plugin_Handled;
        }
        
        
    ForcePlayerSuicide(client);           
        
    ReplyToCommand(client"%s \x05You killed yourself..."MESSAGE_PREFIX);
        
        return 
    Plugin_Handled;        

    __________________
    B3none 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 07:18.


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