Raised This Month: $32 Target: $400
 8% 

[DOD] weapons, classes, teams Addon (request/solution)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 09-26-2021 , 04:37   [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #1

Introduction
To avoid chaos. I publish my research on the use of amxx for Day of Defeat strictly in this forum thread. After many years, I hope that the next researcher will find a centralized warehouse of useful information right here. I edited and updated all the messages from my authorship, once there were stupid questions and drafts, but now everything will be structured and understandable here.
My short story logfile:
  • 2015 Internet playing in DOD
  • 2018 Create map dod_froze::Learning Valve Hammer Editor
  • 2019 Help to one guy collecting models and sprites to make japan and ussr mod::learning the Milkshape 3D 1.8.4
  • 2020 CS 1.6 server's modeller and map assistant::learning Blender 2.7
  • 2021 Advanced training in the study of the HL engine, start learning amxx.
  • 2022 Continue AMXX Learning, start learning QuakeC and Godot engines::make mods for Quake, Try to create DOD in GDscript (base online works)
  • 2022 Continue AMXX Learning, creating own plugins.
  • 2023 Continue AMXX Learning, Job with foreign offerer to build HLDS DOD server with custom settings.
So the target is: Add Soviet troops to the game, without replacing the standard ones, add capabilities and weapons. Leave behind a significant collection of information and plugins. Please keep in mind that I am not a professional, and my work needs the right patches.
I hope that I will retire from the computer in 2024, I am already very tired of sitting and wasting my eyesight and strength. I lost a lot of weight, my dog died and my son was born. I don't think anyone really wants to cooperate, but I'm always happy to work in a team. Next, I will give a list of useful sources and links to the section in this branch.


How to start create amxx plugins?
Without any theory, you can always start practicing effectively, but I still recommend taking a shallow but broad basic training: I recommend:
  • the official release of AMXX 1.8.2 Full Pack - As the most stable for Day Of Defeat .later versions and variants in ReHLDS do not work cleanly in my opinion
  • Install AMX Mod X Studio and use it for about a week to feel the weight of fate
  • Install Visual Studio Code with AMXX addons (open the settings inside the program and activate the available add-on for AMXX and PAWN)
  • Set up quick launch shortcuts so that your work is convenient, because you will often rewrite some parameters or code options, after which you will need to complement the file, replace it in the server folder, restart the server (sometimes you need to not just write a command, namely close the server application and restart it) I use hotkeys to compile and replace and short commands to restart the server. I save a lot of time thanks to VSCode.
  • Duplicate key events in your plugins with chat messages with information output, this helps a lot.
  • Keep in mind that even if you wrote your code absolutely correctly in amxx for DOD, it may not work, because some methods are not reliable. don't be sad.
  • Study the architecture of the game code and events. read other people's plugins, Test and good luck!
For me, the game processis technically implemented like this:
We have a huge table with ordinal numbers inherent in game objects. these objects may have different types of data in a certain column, but in general, this entire basic data package is updated 100 times per second for smooth movement and fast gameplay. We can overwrite the data in these cells (for example, the name of the player, the number of rounds or the point of his location in the space) all programming is a mathematical function that refers to certain cells or columns in the table. the plugin is a script as an additional part of the code for the existing paradigm. A plugin is a procedure. The game is a product of object-oriented programming.Think about it

This topic chapters:

Last edited by TheVaskov; 05-06-2023 at 11:50.
TheVaskov is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 09-26-2021 , 04:50   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #2

Installing AMX mod X for Day of Defeat 1.3 server (Goldsrc) for Windows

Example
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	65
Size:	50.4 KB
ID:	198822   Click image for larger version

Name:	2.png
Views:	48
Size:	40.2 KB
ID:	198823  

Last edited by TheVaskov; 03-18-2024 at 11:47.
TheVaskov is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-26-2021 , 08:26   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #3

I suggest optimizing that code a bit.
__________________
DJEarthQuake is offline
Old 09-26-2021, 10:49
TheVaskov
This message has been deleted by TheVaskov.
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-26-2021 , 14:21   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #4

A couple months ago when dodplugins.net was up, I grabbed most of the plugins' source code so if you knew of a particular plugin that you are looking for, I could try and find it for you. I didn't backup anything other than the source code (no models, sprites, etc.) so I won't be able to get you those.
__________________
fysiks is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 09-26-2021 , 15:22   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #5

How to make your own dod plugin
Example

Last edited by TheVaskov; 01-05-2023 at 03:21.
TheVaskov is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-26-2021 , 16:00   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #6

  1. If you're new to AMX Mod X scripting, you need to learn to search. Use the tutorial section and practice. There is a whole ton of information about basic scripting.
  2. Orpheu was not written by Arkshine and you generally shouldn't start with it. If there is something specific that you need to do with it that you can't do other ways is when you'll need to get into it.
__________________
fysiks is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-27-2021 , 11:28   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #7

Quote:
Originally Posted by TheVaskov View Post
please wellcome
Anytime. Nice to see DoD activity.
Make an array.
e.g.

Script I posted today. You could do the same and make 1 function instead of bunches.
https://forums.alliedmods.net/showpo...02&postcount=2

Here's one for OP4 not command based just resource drops. Same basic techniques apply.

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine_stocks>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define MAX_NAME_LENGTH  32
#define charsmin -1

new const GIVES[][]=
{
    
"ammo_9mmbox",
    
"ammo_ARgrenades",
    
"ammo_buckshot",
    
"weapon_pipewrench",
    
"weapon_penguin",
    
"weapon_knife",
    
"weapon_shockrifle",
    
"weapon_sporelauncher",
    
"weapon_m249",
    
"weapon_grapple",
    
"weapon_eagle",
    
"weapon_sniperrifle",
    
"weapon_displacer",
    
"item_longjump",
    
"weapon_357",
    
"weapon_9mmAR",
    
"weapon_crossbow",
    
/*"weapon_crowbar",*/
    
"weapon_egon",
    
"weapon_gauss",
    
"weapon_handgrenade",
    
"weapon_hornetgun",
    
"weapon_rpg",
    
"weapon_satchel",
    
"weapon_shotgun",
    
"weapon_snark",
    
"weapon_tripmine",
    
"weapon_9mmhandgun"
}

new const 
REPLACE[][] = {"ammo_""weapon_""item_"}
new const 
tracer[]={"ammo_buckshot"}
new 
g_map_ent

public plugin_init()
{
    
register_plugin("Gives random weapon(s) on spawn.""A"".sρiηX҉.");
    
RegisterHam(Ham_Spawn"player""client_getfreestuff"1);

    new 
mname[MAX_NAME_LENGTH];
    
get_mapname(mname,charsmax(mname));
    
g_map_ent find_ent_by_class(charsmintracer)
    if (
containi(mname,"op4c") > charsmin || g_map_ent)
        
pause "a";
}

public 
client_getfreestuff(id)
{
    if( !
is_user_connected(id) || is_user_bot(id) )
    return 
PLUGIN_HANDLED_MAIN;

    
client_print idprint_chat"Free random items on spawn!"

    
if( is_user_alive(id) && is_user_admin(id) )
    {
        
#if AMXX_VERSION_NUM == 182;
        
set_task(5.0"reward"id__"a"4);
        
#else
        
set_task_ex(5.0"reward"id, .flags SetTask_RepeatTimes, .repeat 4);
        
#endif
        
give_item(id"weapon_knife");
    }
    else
    if( 
is_user_alive(id) )
        
#if AMXX_VERSION_NUM == 182;
        
set_task(10.0"reward"id__"a"2);
        
#else
        
set_task_ex(10.0"reward"id, .flags SetTask_RepeatTimes, .repeat 2);
        
#endif

    
return PLUGIN_CONTINUE;
}

public 
reward(needy)
{
    new 
charity[MAX_NAME_LENGTH];
    
formatex(charitycharsmax(charity), GIVES[random(sizeof(GIVES))]);
    if( 
is_user_alive(needy) )
    {
        
give_item(needycharity);
        for ( new 
MENTMENT sizeof REPLACE; ++MENT )
            
replace(charitycharsmax(charity), REPLACE[MENT], " ");

        if(!
is_user_bot(needy))
            
client_print(needyprint_center,"^n Free%s!"charity);
    }



Pretty sure every include isn't needed on WeaponD2OD
__________________

Last edited by DJEarthQuake; 09-27-2021 at 11:56. Reason: fines
DJEarthQuake is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 09-27-2021 , 11:53   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #8

Quote:
Originally Posted by fysiks View Post
Thank a lot for Tutorials link.
So..Can I count on the archive with sma files? "cause on Your's Github I found not many plugins.


Quote:
Originally Posted by DJEarthQuake View Post
Anytime. Nice to see DoD activity.
Make an array.
e.g.
In my server your code works not correkt.

Last edited by TheVaskov; 10-01-2021 at 16:57.
TheVaskov is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 09-28-2021 , 04:05   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #9

Say full name. All mods. If one does not hear the bell then they do not know how to spell too well.
Code:
#include amxmodx #include amxmisc #include fun #define charsmin                  -1 #define MAX_RESOURCE_PATH_LENGTH   64 public plugin_init() register_plugin("wep intrcp","1.0","SPiNX") public client_command(id) if(is_user_connected(id)) {     new said[MAX_RESOURCE_PATH_LENGTH]     read_args(said,charsmax(said))     if(containi(said,"weapon_") != charsmin)     {         client_print id, print_console, "%s", said         if(is_running("dod") == 1)         {             strip_user_weapons(id)             give_item(id,"weapon_colt")             give_item(id,"weapon_spade")             give_item(id,"weapon_handgrenade")             give_item(id,"weapon_stickgrenade")         }         give_item(id,said)         client_cmd(id,"spk buttons/bell1.wav");     } }
__________________
DJEarthQuake is offline
TheVaskov
Member
Join Date: Sep 2021
Location: Russia
Old 10-01-2021 , 06:34   Re: [DOD] weapons, classes, teams Addon (request/solution)
Reply With Quote #10

topic about
changle player model to create teams and classes
still Not complete

https://gamebanana.com/mods/353901 USSR mDL
Example

Last edited by TheVaskov; 02-12-2022 at 13:01.
TheVaskov 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 08:29.


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