Raised This Month: $13 Target: $400
 3% 

Mines Platform (Lasermine/Tripmine/Claymore)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff       
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-14-2020 , 01:48   Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #1


Mines Platform
(Lasermine/Tripmine/Claymore) v0.05


  • Descliption:
    • This is a platform for managing various mines.
    • Each player can select the mines they want to use and place them on the floor or wall.
    • Enter "mines" or "/ mines" in chat to open the menu.
    • In the menu you can select, purchase, install and collect land mines.
    • Custom mines can be added. (tutorial)
    • has a models change API. (ex) look for lasermine source.)
    • Modules:
      • [required]: v0.02: AMXMODX 1.10.0 / v0.03: AMXMODX 1.8.2

    • Optional:
      • If use BIOHAZARD or Zombie Plague Plugin.
        Please make re-compile for environment.
        Code:
        //#define BIOHAZARD_SUPPORT
        //#define ZP_SUPPORT
      • Non-Steam is not supported.

  • Usage:
    Code:
    Admin Console command
    • mines_remove <userid>
      • - remove all mine. target user.
    • mines_give <userid> <minesId>
      • - give mine. target user. (start amount.)
    Client command
    • +mdeploy
      • - ex) bind v +mdeploy
      • - can set selected mines on the wall
    • +mpickup
      • - ex) bind j +mpickup
      • - can pickup selected mines in ammo.
    • say "/mines" or "mines"
      • - Open the mines menu.

  • Cvars:
    PHP Code:
    // ================================================================
    // Common Settings.
    // ================================================================
    // lasermine ON/OFF (1 / 0)
    amx_mines_enable                 "1"

    // lasermine access level (0 = all, 1 = admin only)
    amx_mines_access                 "0"

    // Round start delay time. (5 seconds)
    amx_mines_round_delay         "5"

    // Each Mines Cvars:
    // .... 
  • Credits:
    Code:
  • Known issues.

Changelog


ScreenShot:
https://forums.alliedmods.net/showpo...45&postcount=5

GitHub:
https://github.com/AoiKagase/Amxx-MinesPlatform

i'm tired!
Attached Files
File Type: zip mines_platform_004.zip (1.03 MB, 9 views)
File Type: zip mines_platform_005.zip (1.02 MB, 2 views)
__________________

Last edited by +ARUKARI-; 06-21-2020 at 06:10. Reason: v0.4 release.
+ARUKARI- is offline
alferd
Veteran Member
Join Date: Dec 2019
Old 05-14-2020 , 02:46   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #2

Good job,
Is it just for the zombie server?

Quote:
Originally Posted by +ARUKARI- View Post
[*]Modules:
  • [required]: AMXMODX v1.10.0
Is it just for the Amx Mod X 1.10.0?
1.8.2 does not work?

Does the mine explode when the "CT" lands and passes over the mine?

I hope you understand what I mean

Sorry for misspelling English

Last edited by alferd; 05-14-2020 at 02:49.
alferd is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-14-2020 , 02:51   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #3

The attached mines are the same as "Laser/Tripmine Entity".
Not for Zombie Mod.

Quote:
Is it just for the Amx Mod X 1.10.0?
1.8.2 does not work?
Yes. It doesn't work in 1.8.2 because it uses many functions in 1.10.
__________________

Last edited by +ARUKARI-; 05-14-2020 at 02:56.
+ARUKARI- is offline
alferd
Veteran Member
Join Date: Dec 2019
Old 05-14-2020 , 03:12   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #4

Quote:
Originally Posted by +ARUKARI- View Post
Yes. It doesn't work in 1.8.2 because it uses many functions in 1.10.
Oh No, OK Tnx
alferd is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-14-2020 , 03:15   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #5

Examble menu.


default attached mines.


add lasermine damage logic.


deploying.
__________________
+ARUKARI- is offline
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-14-2020 , 06:08   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #6

Custom Mines Tutorial
Exampble Lasermine.
0. Use this Native Functions.
PHP Code:
// These two are used to register land mines.
native register_mines                (classname[MAX_CLASS_LENGTH], langKey[MAX_NAME_LENGTH]);
native register_mines_data            (iMinesIdminesData[COMMON_MINES_DATA], minesModel[MAX_MODEL_LENGTH]);

// If you want to deploy or pick up in each mines logic, call these.
// Normally it is not used because it is processed by core.
native mines_progress_deploy        (idiMinesId);
native mines_progress_pickup        (idiMinesId);
native mines_progress_stop            (id);

// Call these if you want to make a purchase for each mine logic.
// Normally it is not used because it is processed by core.
native mines_buy                    (idiMinesId);

// Explosion.
native mines_explosion                (idiMinesIdiEnt);

// is valid take damage?
native mines_valid_takedamage        (iAttackeriTarget);

// Set Multi Language file.
native mines_register_dictionary    (path[]);
// Set Custom Resources.
native mines_resources                (iMinesIdkey[], value[], sizedef[]);

// Deployed Mines, Set Any Settings.
forward mines_entity_spawn_settings    (iEntuIDiMinesId);
// Deploying Cursor Set Position.
forward mines_deploy_hologram        (idiEntiMinesId);
// client_putinserver
forward mines_client_putinserver    (id);
// client_disconnected
forward mines_client_disconnected    (id);
// plugins_end
forward mines_plugin_end            ();
// Remove Mines.
forward mines_remove_entity            (iEnt);

// Check Logic.
// check for deploy.
forward CheckForDeploy                (idiMinesId);
// check for pickup.
forward CheckForPickup                (idiMinesId);
// check for buy.
forward CheckForBuy                    (idiMinesId);

forward MinesPickup                    (idiMinesIdtarget);
// Think Event Logic.
forward MinesThink                    (iEntiMinesId);
// Mines Breaked Logic.
// If take some action if the mine breaks?
forward MinesBreaked                (iMinesIdiEntiAttacker); 
1. Include natives.
PHP Code:
#include <mines_natives> 
2. Register Mines
PHP Code:
// Save This Mines ID
new gMinesId;

public 
plugin_precache() 
{
    
// Regstring.
    
gMinesId register_mines("lasermine""LM_LANG_KEY_LONGNAME");

    
// This under the logic if use custom resources.
    // Read mines_resources.ini [clasname section]
    
mines_resources(gMinesId"ENT_SOUND1",  gResources[SOUND1],  charsmax(gResources[SOUND1]),  ENT_SOUND1);
    
mines_resources(gMinesId"ENT_SOUND2",  gResources[SOUND2],  charsmax(gResources[SOUND2]),  ENT_SOUND2);
    
mines_resources(gMinesId"ENT_SOUND3",  gResources[SOUND3],  charsmax(gResources[SOUND3]),  ENT_SOUND3);
    
mines_resources(gMinesId"ENT_SOUND4",  gResources[SOUND4],  charsmax(gResources[SOUND4]),  ENT_SOUND4);
    
mines_resources(gMinesId"ENT_SOUND5",  gResources[SOUND5],  charsmax(gResources[SOUND5]),  ENT_SOUND5);
    
mines_resources(gMinesId"ENT_SOUND6",  gResources[SOUND6],  charsmax(gResources[SOUND6]),  ENT_SOUND6);
    
mines_resources(gMinesId"ENT_MODELS",  gResources[MODELS],  charsmax(gResources[MODELS]),  ENT_MODELS);
    
mines_resources(gMinesId"ENT_SPRITE1"gResources[SPRITE1], charsmax(gResources[SPRITE1]), ENT_SPRITE1);

    
precache_sound(gResources[SOUND1]);
    
precache_sound(gResources[SOUND2]);
    
precache_sound(gResources[SOUND3]);
    
precache_sound(gResources[SOUND4]);
    
precache_sound(gResources[SOUND5]);
    
precache_sound(gResources[SOUND6]);
    
precache_model(gResources[MODELS]);
    
gBeam precache_model(gResources[SPRITE1]);

3. Common Mines Settings
Set the values in this structure respectively.
PHP Code:
enum _:COMMON_MINES_DATA
{
    
// Round start have ammo count.
    
AMMO_HAVE_START        ,

    
// Max having ammo.
    
AMMO_HAVE_MAX        ,

    
// Max deployed in team.
    
NO_ROUND            ,

    
// Max deployed in user.
    
DEPLOY_MAX            ,

    
// Max deployed in team.
    
DEPLOY_TEAM_MAX        ,

    
// Buy mode. 0 = off, 1 = on.
    
BUY_MODE            ,

    
// Buy Price.
    
BUY_PRICE            ,

    
// Stay in buy zone can buy.
    
BUY_ZONE            ,

    
// Can buy team.
    
CsTeams:BUY_TEAM    ,

    
// Get money.
    
FRAG_MONEY            ,

    
// Can broken Mines.(0 = mines, 1 = Team, 2 = Enemy, 3 = Enemy Only.)
    
MINES_BROKEN        ,
    
// allow pickup mine. (0 = disable, 1 = it's mine, 2 = allow friendly mine, 3 = allow enemy mine!)
    
ALLOW_PICKUP        ,

    
// Dead Player remove lasermine. 0 = off, 1 = on.
    
DEATH_REMOVE        ,

    
// mines glowing. 0 = off, 1 = on.
    
GLOW_ENABLE            ,
    
// Mine glow coloer 0 = team color, 1 = green.
    
GLOW_MODE            ,
    
// Team-Color for Terrorist. (bit)
    
GLOW_COLOR_TR        ,
    
// Team-Color for Counter-Terrorist. default:blue (R,G,B)
    
GLOW_COLOR_CT        ,

    
// Waiting for deploy mines. (int:seconds. 0 = no progress bar.)
    
Float:ACTIVATE_TIME    ,

    
// mines Health.
    
Float:MINE_HEALTH    ,
    
// Explosion radius.
    
Float:EXPLODE_RADIUS,
    
// Explosion radius damage.
    
Float:EXPLODE_DAMAGE,

    
// [gboom] = precache_model(explosion sprite);
    
EXPLODE_SPRITE        ,

PHP Code:
// Global Variables
new gMinesData[COMMON_MINES_DATA];
public 
plugin_init()
{
    
// cvar settings...
    //

    // Commons Data
    
bind_pcvar_num        (gCvar[CVAR_START_HAVE],         gCvarValue[VL_START_HAVE]);
    
bind_pcvar_num        (gCvar[CVAR_MAX_HAVE],             gCvarValue[VL_MAX_HAVE]);
#if defined BIOHAZARD_SUPPORT
    
bind_pcvar_num        (gCvar[CVAR_NOROUND],             gCvarValue[VL_NOROUND]);
#endif
    
bind_pcvar_num        (gCvar[CVAR_MAX_DEPLOY],        gCvarValue[VL_MAX_DEPLOY]);
    
bind_pcvar_num        (gCvar[CVAR_TEAM_MAX],            gCvarValue[VL_TEAM_MAX]);
    
bind_pcvar_num        (gCvar[CVAR_BUY_MODE],            gCvarValue[VL_BUY_MODE]);
    
bind_pcvar_num        (gCvar[CVAR_BUY_ZONE],            gCvarValue[VL_BUY_ZONE]);
    
bind_pcvar_num        (gCvar[CVAR_COST],                gCvarValue[VL_COST]);
    
bind_pcvar_num        (gCvar[CVAR_FRAG_MONEY],        gCvarValue[VL_FRAG_MONEY]);
    
bind_pcvar_num        (gCvar[CVAR_MINE_BROKEN],        gCvarValue[VL_MINE_BROKEN]);
    
bind_pcvar_num        (gCvar[CVAR_ALLOW_PICKUP],        gCvarValue[VL_ALLOW_PICKUP]);
    
bind_pcvar_num        (gCvar[CVAR_DEATH_REMOVE],        gCvarValue[VL_DEATH_REMOVE]);
    
bind_pcvar_num        (gCvar[CVAR_MINE_GLOW],            gCvarValue[VL_MINE_GLOW]);
    
bind_pcvar_num        (gCvar[CVAR_MINE_GLOW_MODE],     gCvarValue[VL_MINE_GLOW_MODE]);
    
bind_pcvar_float    (gCvar[CVAR_MINE_HEALTH],         gCvarValue[VL_MINE_HEALTH]);
    
bind_pcvar_float    (gCvar[CVAR_LASER_ACTIVATE],    gCvarValue[VL_LASER_ACTIVATE]);
    
bind_pcvar_float    (gCvar[CVAR_EXPLODE_RADIUS],    gCvarValue[VL_EXPLODE_RADIUS]);
    
bind_pcvar_float    (gCvar[CVAR_EXPLODE_DMG],        gCvarValue[VL_EXPLODE_DMG]);
    
bind_pcvar_string    (gCvar[CVAR_CBT],                 gCvarValue[VL_CBT],             charsmax(gCvarValue[VL_CBT]));
    
bind_pcvar_string    (gCvar[CVAR_MINE_GLOW_TR],        gCvarValue[VL_MINE_GLOW_TR],     charsmax(gCvarValue[VL_MINE_GLOW_TR]) - 1);// last comma - 1
    
bind_pcvar_string    (gCvar[CVAR_MINE_GLOW_CT],        gCvarValue[VL_MINE_GLOW_CT],     charsmax(gCvarValue[VL_MINE_GLOW_CT]) - 1);// last comma - 1

    // Original Data
    
bind_pcvar_num        (gCvar[CVAR_LASER_VISIBLE],         gCvarValue[VL_LASER_VISIBLE]);       // Laser line Visiblity. 0 = off, 1 = on.
    
bind_pcvar_num        (gCvar[CVAR_LASER_BRIGHT],         gCvarValue[VL_LASER_BRIGHT]);       // Laser line brightness.
    
bind_pcvar_num        (gCvar[CVAR_LASER_WIDTH],         gCvarValue[VL_LASER_WIDTH]);        // Laser line width.
    
bind_pcvar_num        (gCvar[CVAR_LASER_COLOR],         gCvarValue[VL_LASER_COLOR]);           // Laser line color. 0 = team color, 1 = green
    
bind_pcvar_num        (gCvar[CVAR_LASER_DMG_MODE],     gCvarValue[VL_LASER_DMG_MODE]);       // Laser line damage mode. 0 = frame rate dmg, 1 = once dmg, 2 = 1second dmg.
    
bind_pcvar_num        (gCvar[CVAR_DIFENCE_SHIELD],     gCvarValue[VL_DIFENCE_SHIELD]);        // Shield hit.
    
bind_pcvar_num        (gCvar[CVAR_REALISTIC_DETAIL],     gCvarValue[VL_REALISTIC_DETAIL]);    // Spark Effect.
    
bind_pcvar_float    (gCvar[CVAR_LASER_DMG],         gCvarValue[VL_LASER_DMG]);            // Laser hit Damage.
    
bind_pcvar_float    (gCvar[CVAR_LASER_DMG_DPS],     gCvarValue[VL_LASER_DMG_DPS]);       // Laser line damage mode 2 only, damage/seconds. default 1 (sec)
    
bind_pcvar_float    (gCvar[CVAR_LASER_RANGE],         gCvarValue[VL_LASER_RANGE]);        // Laserbeam range.
    
bind_pcvar_string    (gCvar[CVAR_LASER_COLOR_TR],     gCvarValue[VL_LASER_COLOR_TR],    charsmax(gCvarValue[VL_LASER_COLOR_TR]));      // Laser line color. 0 = team color, 1 = green
    
bind_pcvar_string    (gCvar[CVAR_LASER_COLOR_CT],     gCvarValue[VL_LASER_COLOR_CT],    charsmax(gCvarValue[VL_LASER_COLOR_CT]));      // Laser line color. 0 = team color, 1 = green

    // Commons Data Setting
    
gMinesData[BUY_TEAM]            =    get_team_code(gCvarValue[VL_CBT]);
    
gMinesData[GLOW_COLOR_TR]        =    get_cvar_to_color(gCvarValue[VL_MINE_GLOW_TR]);
    
gMinesData[GLOW_COLOR_CT]        =    get_cvar_to_color(gCvarValue[VL_MINE_GLOW_CT]);

    
gMinesData[AMMO_HAVE_START]        =    gCvarValue[VL_START_HAVE];
    
gMinesData[AMMO_HAVE_MAX]        =    gCvarValue[VL_MAX_HAVE];
#if defined BIOHAZARD_SUPPORT
    
gMinesData[NO_ROUND]            =    gCvarValue[VL_NOROUND];
#endif
    
gMinesData[DEPLOY_MAX]            =    gCvarValue[VL_MAX_DEPLOY];
    
gMinesData[DEPLOY_TEAM_MAX]        =    gCvarValue[VL_TEAM_MAX];
    
gMinesData[BUY_MODE]            =    gCvarValue[VL_BUY_MODE];
    
gMinesData[BUY_ZONE]            =    gCvarValue[VL_BUY_ZONE];
    
gMinesData[BUY_PRICE]            =    gCvarValue[VL_COST];
    
gMinesData[FRAG_MONEY]            =    gCvarValue[VL_FRAG_MONEY];
    
gMinesData[MINES_BROKEN]        =    gCvarValue[VL_MINE_BROKEN];
    
gMinesData[ALLOW_PICKUP]        =    gCvarValue[VL_ALLOW_PICKUP];
    
gMinesData[DEATH_REMOVE]        =    gCvarValue[VL_DEATH_REMOVE];
    
gMinesData[GLOW_ENABLE]            =    gCvarValue[VL_MINE_GLOW];
    
gMinesData[GLOW_MODE]            =    gCvarValue[VL_MINE_GLOW_MODE];
    
gMinesData[MINE_HEALTH]            =    gCvarValue[VL_MINE_HEALTH];
    
gMinesData[ACTIVATE_TIME]        =    gCvarValue[VL_LASER_ACTIVATE];
    
gMinesData[EXPLODE_RADIUS]        =    gCvarValue[VL_EXPLODE_RADIUS];
    
gMinesData[EXPLODE_DAMAGE]        =    gCvarValue[VL_EXPLODE_DMG];

    
// commons data update.
    // parameter: this mines id, common mines data, model path.
    
register_mines_data(gMinesIdgMinesDatagResources[MODELS]);

4. Check Deploying Logic.
PHP Code:
public CheckForDeploy(idiMinesId)
{
    
// Other Mines?
    
if(iMinesId != gMinesId) return false;

    new 
Float:vTraceEnd    [3];
    new 
Float:vOrigin    [3],Float:vViewOfs[3];

    
// Get potision.
    
pev(idpev_origin,     vOrigin);
    
pev(idpev_view_ofs,     vViewOfs);
    
xs_vec_add(vOriginvViewOfsvOrigin);      

    
// Get wall position.
    
velocity_by_aim(id128vTraceEnd);
    
xs_vec_add(vTraceEndvOriginvTraceEnd);

    
// create the trace handle.
    
new trace create_tr2();
    new 
Float:fFraction 0.0;
    
engfunc(EngFunc_TraceLinevOriginvTraceEndIGNORE_MONSTERSidtrace);
    {
        
get_tr2traceTR_flFractionfFraction );
    }
    
// free the trace handle.
    
free_tr2(trace);

    
// We hit something!
    
if ( fFraction 1.0 )
        return 
true;

    new 
sLongName[MAX_NAME_LENGTH];
    
formatex(sLongNamecharsmax(sLongName), "%L"idLANG_KEY_LONGNAME);
    
client_print_color(idid"%L"idLANG_KEY_PLANT_WALLCHAT_TAGsLongName);

    return 
false;

5. Deployed Mine setting.
PHP Code:
// Native Forward function.
public mines_entity_spawn_settings(iEntuIDiMinesId)
{
    
// if other mines return.
    
if (iMinesId != gMinesId) return;

    
// Entity Setting.
    // set class name.
    
set_pev(iEntpev_classnameENT_CLASS_LASER);
    
// set models.
    
engfunc(EngFunc_SetModeliEntgResources[MODELS]);
    
// set solid.
    
set_pev(iEntpev_solidSOLID_NOT);
    
// set movetype.
    
set_pev(iEntpev_movetypeMOVETYPE_FLY);

    
// set model animation.
    
set_pev(iEntpev_frame,        0);
    
set_pev(iEntpev_framerate,    0.0);
    
set_pev(iEntpev_body,         3);
    
set_pev(iEntpev_sequence,     TRIPMINE_WORLD);
    
set_pev(iEntpev_rendermode,    kRenderNormal);
    
set_pev(iEntpev_renderfx,         kRenderFxNone);
    
// .......
    // Position, sound, think etc...

6. Think Event Logic.
PHP Code:
// Native Forward function.
public MinesThink(iEntiMinesId)
{
    if (!
pev_valid(iEnt))
        return;

    
// is this lasermine? no.
    
if (iMinesId != gMinesId)
        return;

    
// Think Status/Step.

    
static Float:fCurrTime;
    static 
Float:vEnd[3];
    static 
step;

    
fCurrTime get_gametime();
    
step pev(iEntMINES_STEP);
    
// Get Laser line end potision.
    
pev(iEntLASERMINE_BEAMENDPOINT1vEnd);

    
// lasermine state.
    // Power up.
    
switch(step)
    {
        case 
POWERUP_THINK:
        {
            
mines_step_powerup(iEntfCurrTime);
        }
        case 
BEAMUP_THINK:
        {
            
mines_step_beamup(iEntvEndfCurrTime);
        }
        
// Laser line activated.
        
case BEAMBREAK_THINK:
        {
            
mines_step_beambreak(iEntvEndfCurrTime);
        }
        
// EXPLODE
        
case EXPLOSE_THINK:
        {
            
// Stopping sound.
            
lm_play_sound(iEntSOUND_STOP);

            
// effect explosion.
            
mines_explosion(pev(iEntMINES_OWNER), iMinesIdiEnt);
        }
    }

    return;

7. MinesBrakedLogic.
If take some action if the mine breaks?
PHP Code:
// Native Forward function.
public MinesBreaked(iMinesIdiEntiAttacker)
{
    if (
iMinesId != gMinesId
        return 
HAM_IGNORED;

    
// Action Code....

    
return HAM_IGNORED;

8. Deploying Hologram Logic.
PHP Code:
// Native Forward function.
public mines_deploy_hologram(idiEntiMinesId)
{
    if (
iMinesId != gMinesId)
        return 
0;

    
// Vector settings.
    
static    Float:vOrigin    [3],Float:vViewOfs    [3];
    static    
Float:vNewOrigin[3],Float:vNormal    [3];
    static    
Float:vTraceEnd    [3],Float:vEntAngles[3];

    
// Get wall position.
    
velocity_by_aim(id128vTraceEnd);
    
// get user position.
    
pev(idpev_originvOrigin);
    
pev(idpev_view_ofsvViewOfs);
    
xs_vec_add(vOriginvViewOfsvOrigin);      
    
xs_vec_add(vTraceEndvOriginvTraceEnd);

    
// create the trace handle.
    
static trace;
    static 
result;
    
result 0;
    
trace create_tr2();
    
// get wall position to vNewOrigin.
    
engfunc(EngFunc_TraceLinevOriginvTraceEndIGNORE_MONSTERSidtrace);
    {
        
// -- We hit something!
        // -- Save results to be used later.
        
get_tr2(traceTR_vecEndPosvTraceEnd);
        
get_tr2(traceTR_vecPlaneNormalvNormal);

        if (
xs_vec_distance(vOriginvTraceEnd) < 128.0)
        {
            
xs_vec_mul_scalar(vNormal8.0vNormal);
            
xs_vec_add(vTraceEndvNormalvNewOrigin);
            
// set entity position.
            
engfunc(EngFunc_SetOriginiEntvNewOrigin);
            
// Rotate tripmine.
            
vector_to_angle(vNormalvEntAngles);
            
// set angle.
            
set_pev(iEntpev_anglesvEntAngles);
            
result 1;
        }
        else
        {
            
result 0;
        }
    }
    
// free the trace handle.
    
free_tr2(trace);


    return 
result;

__________________

Last edited by +ARUKARI-; 05-16-2020 at 02:40.
+ARUKARI- is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2020 , 07:59   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #7

If you're going to make the plugin 1.10-only, you should consider using the new functions available in 1.10:
  • register_cvar + get_pcvar_* => create_cvar + bind_pcvar_*
  • register_event => register_event_ex
  • set_task => set_task_ex
  • replace_all => replace_string
  • "%n" directly in the message instead of "get_user_name"
  • The "body" argument in "get_user_aiming" is no longer mandatory.
  • Same goes for "menu_item_getinfo" - all arguments are no longer mandatory. Only the first 2 are.
  • Multilingual menus. In 1.10 "menu_create" has an additional argument that makes the entire menu use language keys instead of normal strings. There is no reason for you to format a %L string manually.
__________________

Last edited by OciXCrom; 05-14-2020 at 08:00.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
+ARUKARI-
AlliedModders Donor
Join Date: Jul 2004
Location: Japan
Old 05-14-2020 , 09:52   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #8

@OciXCrom
I didn't expect to review this code in detail.
Thank you very much.
now working in progress.
__________________
+ARUKARI- is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 05-14-2020 , 13:40   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #9

Quote:
Originally Posted by +ARUKARI- View Post
@OciXCrom
I didn't expect to review this code in detail.
Thank you very much.
now working in progress.
I didn't. Just quickly scrolled through it to see some of the old functions you're using. I may have missed some. Just wanted to let you know that there are better alternatives available. You can check the changelog to see which new features you can use in 1.10.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
ifx
Senior Member
Join Date: Apr 2008
Old 05-15-2020 , 02:55   Re: Mines Platform (Lasermine/Tripmine/Claymore)
Reply With Quote #10

you should add comp for amxx190+
nobody will use amxx1010, cause its on early beta and only for developers for now

anyway, both plugins - landmines and lasermines - was already created and perfectly work on amxx182+
ifx 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 10:20.


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