1. Check out the Store if you're looking to Buy HL2RP or other schemas for your server. You can click Buy Schemas on the very top navigation bar to visit the store.
  2. Use the Plugin Center to easily subscribe to and auto-install Clockwork plugins to your server, or submit and share plugins you have developed.
  3. Having trouble setting up or developing with Clockwork? Check out the Wiki or post in the Support Forum for advice from fellow users.
Dismiss Notice
Hi Guest, you need a Steam account to register and post on these forums. Login with Steam at the top of the forums to get started!
Dismiss Notice
Hi Guest, do you want to buy HL2RP or another Clockwork schema? Visit the Cloud Sixteen Store to get started!

HL2RP /shoot

Discussion in 'Plugins' started by kenkade4, Jan 19, 2019.

  1. kenkade4

    kenkade4 Clockwork Customer

  2. so basically the one plugin that you can do /firearms for
     
  3. kenkade4

    kenkade4 Clockwork Customer

    Yeah, basically.
     
  4. Duspende_

    Duspende_ Veteran Active Member

    I'd suggest categorizing the injuries in the document in accordance with how lethal and/or severe it would be.

    Additionally, it allows you to, instead of attributing X% of hitting a certain injury, you could have it be X% chance of a category being picked, and then a randomized injury in the category.

    I.e a shot in the head, heart, upper spine would be the most severe and fatal, and as such has maybe a 5% chance, and then it picks one of the three at random.

    Doing this in the document means less curation work for a developer.
     
  5. NoahtheBoah36™

    NoahtheBoah36™ Clockwork Retard Clockwork Customer Active Member

    While this is kind of a necro post I'll work on something like this as I would probably want one on my own server and post it here when I'm done. Not sure if I'll do exactly what you're wanting I'll probably do something extremely similar, and you're welcome to tweak it as you see fit.

    Edit: I wrote something up and I'll test it a bit later, then upload the code to this post if it works right.

    2nd Edit: Can't get it to work, but here's the code I've done so far. Maybe somebody else can explain why it's not showing up in my commands list.
    Code:
    -- Created by NoahtheBoah36 ([email protected])
    -- Permission to redistribute/use/modify is granted, provided credit is given to the developer.
    
    local COMMAND = Clockwork.command:New("GetHit");
    COMMAND.tip = "Randomly determine where a target is hit on their body.";
    COMMAND.flags = CMD_DEFAULT;
    
    -- Called when the command has been run.
    function COMMAND:OnRun(player, arguments)
        local randomizer = math.random(1, 20);
       
        if randomizer == 1
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the head!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        elseif randomizer <= 6
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the chest!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        elseif randomizer <= 12
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the abdomen!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        elseif randomizer <= 15
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the shoulder!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        elseif randomizer <= 17
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the arm!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        elseif randomizer <= 19
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is hit in the leg!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        else
            Clockwork.chatBox:AddInTargetRadius(player, "it", "The target is miraculously missed!", player:GetPos(), Clockwork.config:Get("talk_radius"):Get() * 2);
        end;
    end;
    
    COMMAND:Register();
    
     
    Last edited: Apr 20, 2019

Previous Readers (Total: 0)