AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   New Plugin Submissions (https://forums.alliedmods.net/forumdisplay.php?f=26)
-   -   Multiple Game Names (https://forums.alliedmods.net/showthread.php?t=304076)

D3XT3R 01-03-2018 10:38

Multiple Game Names
 
2 Attachment(s)
Multiple Game Names :attack:


Description:
  • In this plugin you can set multiple game names for your server, which appears in a second. You can modify the gamenames in the ini fille "configs/Game_Names.ini".

Author:

Requirements:
  • FakeMeta

Additional information:

https://forums.alliedmods.net/image-...6869732e706e67

D3XT3R 01-03-2018 10:43

Re: [ReAPI] Multiple Game Names
 
Support:
  • You have any question about this plugin and how to run it, Im ready to help you!

Credit:
  • mforce for idea :D

Change log:
  • Updated Added ini fille to config from him names.
  • Updated Removed reapi and used fakemeta for hlds/rehlds.

klippy 01-03-2018 11:31

Re: [ReAPI] Multiple Game Names
 
All the settings should be configurable without recompiling the plugin.

D3XT3R 01-03-2018 11:53

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by KliPPy (Post 2569516)
All the settings should be configurable without recompiling the plugin.

how that Mr.Genuis

klippy 01-03-2018 12:29

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by D3XT3R (Post 2569520)
how that Mr.Genuis

Use cvars, read them from a file, many other ways.

D3XT3R 01-03-2018 12:43

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by KliPPy (Post 2569528)
Use cvars, read them from a file, many other ways.

i already thinked about cvars and i feel is a bad way so i will add a custum fille ini to read from it

HamletEagle 01-03-2018 13:19

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by D3XT3R (Post 2569520)
how that Mr.Genuis

Your attitude is on point.

Adomaz1 01-03-2018 13:56

Re: [ReAPI] Multiple Game Names
 
I'm amazed how the author isn't D3XT3R [Inv1s production] LOL

OciXCrom 01-03-2018 14:17

Re: [ReAPI] Multiple Game Names
 
I think I'm the author of the thread style though. :|

D3XT3R 01-03-2018 15:59

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by HamletEagle (Post 2569540)
Your attitude is on point.

Give me your suggestion and i will add it intro plugin and my attitude is making it easy and usefull
Quote:

Originally Posted by Adomaz1 (Post 2569549)
I'm amazed how the author isn't D3XT3R [Inv1s production] LOL

Cmon stop those bullshits
Quote:

Originally Posted by OciXCrom (Post 2569551)
I think I'm the author of the thread style though. :|

99% you are right and i will add you to credit if you want :D

OciXCrom 01-03-2018 18:08

Re: [ReAPI] Multiple Game Names
 
Yes, do it with big blue letters please. Jk.

D3XT3R 01-04-2018 13:18

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by OciXCrom (Post 2569593)
Yes, do it with big blue letters please. Jk.

done :lol:

OciXCrom 01-04-2018 15:41

Re: [ReAPI] Multiple Game Names
 
https://www.urbandictionary.com/define.php?term=jk

D3XT3R 01-05-2018 06:04

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by OciXCrom (Post 2569776)

if i wasnt know what it mean i wasnt make it with red collor and big :lol: but i feel sad when i stolen ur style :D so i added to credit =)

DjSoftero 01-05-2018 13:21

Re: [ReAPI] Multiple Game Names
 
rip grammar

D3XT3R 01-05-2018 14:47

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by DjSoftero (Post 2569960)
rip grammar

:/

Relaxing 01-06-2018 06:55

Re: [ReAPI] Multiple Game Names
 
You MUST read from an external file to load the text.

D3XT3R 01-06-2018 12:03

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by Relaxing (Post 2570109)
You MUST read from an external file to load the text.

already tired it and i have a small problem in read from fille
fopen then how it gona read it -.-

OciXCrom 01-06-2018 12:10

Re: [ReAPI] Multiple Game Names
 
Look at my plugins.

D3XT3R 01-06-2018 12:29

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by OciXCrom (Post 2570176)
Look at my plugins.

link?

Relaxing 01-06-2018 13:08

Re: [ReAPI] Multiple Game Names
 
Use charsmax()
else: throw an error to logs

DjSoftero 01-06-2018 13:34

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by D3XT3R (Post 2570180)
link?

his signature is a link

D3XT3R 01-06-2018 14:42

Re: [ReAPI] Multiple Game Names
 
ther is a problem .... it wont read
Code:
#include <amxmodx>     new path[252]     get_configsdir(path, charsmax(path))         format(path, charsmax(path), "%s/Game_Names.ini", path)         if (file_exists(path))     {         new szData[33], szNames[32], iTextLength                 while (read_file(path, iLine, szData, charsmax(szData), iTextLength) != 0)         {             if (iLine > charsmax(g_szNames[]))                 break                         parse(szData, szNames, charsmax(szNames))                         if (szNames[0] == ';' || !szNames[0])             {                 iLine++                 continue             }                         g_szNames[iLine] = szNames                         iLine++         }     }

OciXCrom 01-06-2018 14:53

Re: [ReAPI] Multiple Game Names
 
PHP Code:

if (iLine charsmax(g_szNames[]))
    break 

Wtf is this?

D3XT3R 01-06-2018 15:34

Re: [ReAPI] Multiple Game Names
 
check if more lines in the file as g_szNames[] can store

HamletEagle 01-07-2018 05:41

Re: [ReAPI] Multiple Game Names
 
Use copy....

D3XT3R 01-07-2018 06:41

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by HamletEagle (Post 2570331)
Use copy....

okay i will try

D3XT3R 01-12-2018 16:38

Re: [ReAPI] Multiple Game Names
 
Updated, added config fille to make easy add names

tarsisd2 01-23-2018 22:03

Re: [ReAPI] Multiple Game Names
 
i tried to compile with amx 1.8.3 - amx 1.8.2 and with reamx 1.8.3 locally, and no sucess!

https://image.ibb.co/fzZrOb/error.png

tarsisd2 01-24-2018 12:32

Re: [ReAPI] Multiple Game Names
 
i change some code to compile, now i get no errors

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <reapi>

new g_szGnames[64][32]
new 
iNameLengthiLine

static const PLUGIN_NAME[]     = "Multiple Game Names"
static const PLUGIN_AUTHOR[]     = "mforce & DeXTeR"
static const PLUGIN_VERSION[]    = "1.1"

public plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);    // & ReHLDS Team
    
register_cvar("MultiGameNames"PLUGIN_VERSIONFCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED)
    
    
set_task(1.0"re_gamename", .flags="b");
    
re_read()
}

public 
re_gamename()
{
    
set_member_game(m_GameDescg_szGnames[iLine++ % iNameLength]);
}

public 
re_read()
{
    new 
path[32]
    
get_configsdir(pathcharsmax(path))
    
    
format(pathcharsmax(path), "%s/Game_Names.ini"path)
    
    if (
file_exists(path))
    {
        new 
szData[33], szGnames[32]
        
        while (
read_file(pathiLineszDatacharsmax(szData), iNameLength) != 0)
        {
            if (
iLine charsmax(g_szGnames[]))
                break
            
            
parse(szDataszGnamescharsmax(szGnames))
            
            if (
szGnames[0] == ';' || !szGnames[0])
            {
                continue
            }
            
g_szGnames[iLine] = szGnames
            
            iLine
++
        }
    }


or change
PHP Code:

    register_cvar("MultiGameNames"PLUGIN_VERSIONFCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED

to

PHP Code:

    register_cvar("MultiGameNames""1.1"FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED

since you don't have PLUGIN_VERSION registered anywhere

Hrustus 01-28-2018 13:40

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by tarsisd2 (Post 2573872)
or change
PHP Code:

    register_cvar("MultiGameNames"PLUGIN_VERSIONFCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED

to

PHP Code:

    register_cvar("MultiGameNames""1.1"FCVAR_SERVER|FCVAR_SPONLY|FCVAR_UNLOGGED

since you don't have PLUGIN_VERSION registered anywhere

I did it but now i'm getting error:
Code:

L 01/28/2018 - 19:35:45: [AMXX] Displaying debug trace (plugin "Multiple_Game_Names.amxx")
L 01/28/2018 - 19:35:45: [AMXX] Run time error 11: divide
L 01/28/2018 - 19:35:45: [AMXX]    [0] Multiple_Game_Names.sma::re_gamename (line 20)

Error is on this line:
Code:

        set_member_game(m_GameDesc, g_szGnames[iLine++ % iNameLength]);
Can you help me?
I am using Reapi v5.2.0.1 and Regamedll 5.5.0.286-dev.

tarsisd2 01-28-2018 20:45

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by Hrustus (Post 2574760)
I did it but now i'm getting error:
Code:

L 01/28/2018 - 19:35:45: [AMXX] Displaying debug trace (plugin "Multiple_Game_Names.amxx")
L 01/28/2018 - 19:35:45: [AMXX] Run time error 11: divide
L 01/28/2018 - 19:35:45: [AMXX]    [0] Multiple_Game_Names.sma::re_gamename (line 20)

Error is on this line:
Code:

        set_member_game(m_GameDesc, g_szGnames[iLine++ % iNameLength]);
Can you help me?
I am using Reapi v5.2.0.1 and Regamedll 5.5.0.286-dev.

don't bother, even if you compile the plugin does not work

Relaxing 01-29-2018 13:29

Re: [ReAPI] Multiple Game Names
 
Use fakemeta instead of RE(rip)api. RE(rip) seems unfair for 94.91% of AM members.

HamletEagle 01-29-2018 14:44

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by Relaxing (Post 2575005)
Use fakemeta instead of RE(rip)api. RE(rip) seems unfair for 94.91% of AM members.

Not sure what you mean, but if you want to release plugins here you should choose the way that has the best compatibility.
Fakemeta works in both regamedll/rehlds and default hlds.
Reapi works only in regamedll/rehlds.

There is 0 reason to choose ReAPI over default AMXX modules. Dunno why people don't want to understand this simple thing.

Alber9091 01-29-2018 15:44

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by HamletEagle (Post 2575023)
Not sure what you mean, but if you want to release plugins here you should choose the way that has the best compatibility.
Fakemeta works in both regamedll/rehlds and default hlds.
Reapi works only in regamedll/rehlds.

There is 0 reason to choose ReAPI over default AMXX modules. Dunno why people don't want to understand this simple thing.

Brother, he also said the same thing.
He asked dexter to use Fakemeta, instead of ReAPI.
As it would be better option :)

DjSoftero 01-31-2018 14:04

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by Relaxing (Post 2575005)
Use fakemeta instead of RE(rip)api. RE(rip) seems unfair for 94.91% of AM members.

He doesn't know how to use fakemeta and he ripped off this code from someone else and decided to release it.

p.s. technically he didn't steal it, but he didn't really code anything himself.

D3XT3R 02-01-2018 14:54

Re: [ReAPI] Multiple Game Names
 
sorry guys, as u know study :))) i will update the code soon possible also i didnt test it and that my main problem :D

HamletEagle 02-01-2018 16:54

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by D3XT3R (Post 2575772)
sorry guys, as u know study :))) i will update the code soon possible also i didnt test it and that my main problem :D

NEVER release an untested plugin. There are big chances it won't work.

Sugisaki 02-03-2018 06:21

Re: [ReAPI] Multiple Game Names
 
for this plugin to take effect you should use reunion == dproto
disapproved for me

D3XT3R 02-03-2018 07:25

Re: [ReAPI] Multiple Game Names
 
Quote:

Originally Posted by Sugisaki (Post 2576049)
for this plugin to take effect you should use reunion == dproto
disapproved for me

in real i tested it with no reunion and it works and didnt give me those error logs and i dont know if i uploaded wroung version to alliedmodders so im trying to make it for hlds / rehlds ;)


All times are GMT -4. The time now is 05:23.

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