|
wwA PlayCs
Membru
Membru din: Dum Noi 22, 2015 1:26 pm Mesaje: 301 Localitate: Sibiu
Steam ID: magenkyo17
Skype ID: sound_cstrike
Server Preferat: Respawn.Playcs.ro
|
Descriere: Afiseaza intr-un meniu cateva informatii despre server Descarcare: ws_info_server.rar - 4.3 KbNume: wGods Info Server Versiune: v1.0 Link oficial: Link OfficialInstalare: 1. Dezarhivati arhiva ws_info_server.rar2. Fisierul wgods_info_server.sma il puneti in addons/amxmodx/scripting3. Fisierul wgods_info_server.amxx il puneti in addons/amxmodx/plugins4. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma: - Sursa SMA | Show code
#include < amxmodx >
#pragma semicolon 1
static const PLUGIN[ ] = "wGods Info Server"; static const VERSION[ ] = "v1.0";
new pCvarString[ 2 ];
public plugin_init( ) { register_plugin( PLUGIN, VERSION, "Unhask(c)wargods.ro" ); register_clcmd( "say /info", "cmdInfoServer" ); register_clcmd( "say_team /info", "cmdInfoServer" ); pCvarString[ 0 ] = register_cvar( "ws_info_forum", "www.WarGods.ro" ); pCvarString[ 1 ] = register_cvar( "ws_info_owner", "Unhask" ); }
public cmdInfoServer( szIndex ) { new szMenu = menu_create( "Info Server", "iContent" ); new szAdd[ 164 ], szPlayers[ 32 ], szMap[ 32 ], szForum[ 32 ], szOwner[ 32 ], iNum; get_players( szPlayers, iNum ); get_mapname( szMap, sizeof ( szMap ) - 1 ); get_pcvar_string( pCvarString[ 0 ], szForum, sizeof ( szForum ) - 1 ); get_pcvar_string( pCvarString[ 1 ], szOwner, sizeof ( szOwner ) - 1 ); if ( is_linux_server( ) ) formatex( szAdd, sizeof ( szAdd ) - 1, "\wPlatforma: \rLinux" ); else formatex( szAdd, sizeof ( szAdd ) - 1, "\wPlatforma: \rWindows" ); menu_additem( szMenu, szAdd, "1" ); formatex( szAdd, sizeof ( szAdd ) - 1, "\wSloturi: \r%i", get_maxplayers( ) ); menu_additem( szMenu, szAdd, "2" ); formatex( szAdd, sizeof ( szAdd ) - 1, "\wJucatori: \r%i\w/\r%i", iNum, get_maxplayers( ) ); menu_additem( szMenu, szAdd, "3" ); formatex( szAdd, sizeof ( szAdd ) - 1, "\wHarta: \r%s", szMap ); menu_additem( szMenu, szAdd, "4" ); formatex( szAdd, sizeof ( szAdd ) - 1, "\wOwner: \r%s", szOwner ); menu_additem( szMenu, szAdd, "5" ); formatex( szAdd, sizeof ( szAdd ) - 1, "\wForum: \r%s", szForum ) ; menu_additem( szMenu, szAdd, "6" ); menu_display( szIndex, szMenu, 0 ); return 1; }
public iContent( szIndex, szMenu, szItem ) { if ( szItem == MENU_EXIT ) { menu_destroy( szMenu ); return 1; } new szCommand[ 6 ], szName[ 64 ]; new szAccess, szCallback; menu_item_getinfo( szMenu, szItem, szAccess, szCommand, sizeof ( szCommand ) - 1, szName, sizeof ( szName ) - 1, szCallback ); return 1; } Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): ws_info_forum "www.WarGods.ro" - afiseaza in meniu forumul tau ws_info_owner "Unhask" - afiseaza in meniu ownerul serverului Comenzi publice (se tasteaza in joc prin apasarea tastei Y): /info - afiseaza un meniu cu informatii despre server Imagini: 
_________________ ș-am numa vorbe de aur,ingropama-ti in bvlgari!
|