AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   SET Team By Steam id (https://forums.alliedmods.net/showthread.php?t=308252)

soumyadip77 06-12-2018 22:48

SET Team By Steam id
 
To day i have 2 questions

1. how to can i set players team by steam id steam id will be read from ini..... need 1 tut for read ini

2. how to can i get ct or ts team any player team tag. And set all player with where 1 player [PRO] tah plyer

that means which team have [PRO] tag transfer all players with tag [PRO] to that team :)

EXAMPLE :
PHP Code:

 [PRO] | My name 

ADVANCE THANKS :cry:

fysiks 06-12-2018 23:39

Re: SET Team By Steam id
 
Those are two very vague questions. You should try to do some of this on your own (Scripting Help is about helping you fix your specific issues with your own code).

When you post a thread, make sure that there is only one topic for that thread. If you have multiple unrelated questions (like you do here) you should post two threads.

You should first search for the basic things you want to learn and try writing simple test plugins to test specific parts of code. You can search, on your own, and find many examples of how to do many many things on this website including reading and writing files.

One simple example of reading a file is in the "Bot Apology" plugin in my signature.

soumyadip77 06-12-2018 23:42

Re: SET Team By Steam id
 
:)

soumyadip77 06-13-2018 00:46

Re: SET Team By Steam id
 
@fysiks me tried to make a small map menu to change map (only for learn) but i am getting issue with menu her eis the code

PHP Code:

/* Sublime AMXX Editor v2.2 */

#include <amxmodx>
#include <amxmisc>
// #include <cstrike>
// #include <engine>
// #include <fakemeta>
// #include <hamsandwich>
// #include <fun>
// #include <xs>
// #include <sqlx>

#define PLUGIN  "New Plug-In"
#define VERSION "1.0"
#define AUTHOR  "Author"

new filename164 ];

new Array: 
Maps;

public 
plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR);
    
    
get_configsdir(filename164);
    
format(filename164"%s/special_map.ini"filename);
}

public 
plugin_cfg()
{
    
Maps ArrayCreate(641);
    
    if( 
file_existsfilename ) )
    {
        new 
open fopenfilename"rt");
        
        new 
buffer164 ];
        
        while( !
feofopen ) )
        {
            
fgetsopenbuffercharsmax(buffer));
            
            if( !
buffer] || buffer] == ';' || buffer] == '/' && buffer] == '/' )
            {
                continue;
            }
            
            
trim(buffer);

            
ArrayPushArray(Mapsbuffer);
            
        }
    }
}

public 
ShowMenu(id)
{
    new 
dataMAX_PLAYERS ];
    new 
menu menu_create("MapMenu""chnage_map");
    
    new 
g_maps ArraySize(Maps);
    
    
ArrayGetString(Mapsg_mapsdatacharsmax(data))
    
    
trim(data);
    
    
menu_additem(menudata); //Add the options to the menu
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
    
menu_display(idmenu0);
    
    return 
PLUGIN_HANDLED;
}

public 
chnage_map(idmenuitem)
{
    if(
item == MENU_EXIT)
    {
        
menu_cancel(id);
        return 
PLUGIN_HANDLED;
    }

    new 
buffer[6], access

    menu_item_getinfo
(menuitemaccessbuffercharsmaxbuffer ));


    
menu_destroy(menu);

    return 
PLUGIN_HANDLED;


error
PHP Code:

Compiling Map_Knife... Current time is10:13:50.54 Wed

AMX Mod X Compiler 1.8.3
-dev+5154
Copyright 
(c1997-2006 ITB CompuPhase
Copyright 
(c2004-2013 AMX Mod X Team

D
:\MY AMXX PLUGINS\Map_Knife.sma(86) : error 088number of arguments does not match definition

1 Error
.
Could not locate output file D:\New folder\HLDS\Half-Life\cstrike\addons\amxmodx\plugins\Map_Knife.amx (compile failed).
There was an compilation errorExiting... 

Took 0:00:00,13 seconds to run this script.

[
Finished in 0.2s


iceeedr 06-13-2018 01:05

Re: SET Team By Steam id
 
Come on dude. Which part did not you understand?

When you post a thread, make sure that there is only one topic for that thread. If you have multiple unrelated questions (like you do here) you should post two threads.

soumyadip77 06-13-2018 01:31

Re: SET Team By Steam id
 
i dont want to create multiple topic thats why... can u help me.....in here prob is i cant show maps in menu :/

E1_531G 06-13-2018 07:16

Re: SET Team By Steam id
 
Quote:

Originally Posted by soumyadip77 (Post 2596659)
i dont want to create multiple topic thats why... can u help me.....in here prob is i cant show maps in menu :/

You don't want to create multiple topics, we don't want to help you. Problems? :twisted:

soumyadip77 06-13-2018 10:14

Re: SET Team By Steam id
 
Quote:

Originally Posted by E1_531G (Post 2596691)
You don't want to create multiple topics, we don't want to help you. Problems? :twisted:

ok then me creating 1 more topic :(

fysiks 06-13-2018 23:32

Re: SET Team By Steam id
 
You need to learn to read the compiler output. The error is often explained there and it shows which line of code the error occurred on (the number in parentheses after the file name), as is the case here.

In this specific case, you need to look at the "new menus" tutorial.

soumyadip77 06-14-2018 03:25

Re: SET Team By Steam id
 
Quote:

Originally Posted by fysiks (Post 2596847)
You need to learn to read the compiler output. The error is often explained there and it shows which line of code the error occurred on (the number in parentheses after the file name), as is the case here.

In this specific case, you need to look at the "new menus" tutorial.

bro ik.... but i am confused how to make menu from array :/


All times are GMT -4. The time now is 13:29.

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