hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.08.08. 01:20



Jelenlévő felhasználók

Jelenleg 328 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 327 vendég

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-kor tartózkodott itt.

Regisztrált felhasználók: Google [Bot]az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása Hozzászólás a témához  [10 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 21:21 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Valaki át tudná írni ezt a plugint úgy hogy mikor belép rögtön elinduljon. És ha egyiknek vége véletlen szerűen egy másik induljon el de ne ugyan az? A menü ugyanúgy működjön.

EZT
azé dobok smat is
Kód:
#include <amxmodx>
#include <nvault>

#define VERSION "3.1.1"

#define NVAULT_MAX_DAYS_SAVE    15
#define MAX_RECONNECT_TIME    300 // in seconds (take in account that players could download a new map)
#define DEFAULT_VOLUME 40

#define A_DAY_IN_SECONDS        86400 // 60 * 60 * 24

#define GROUP_MAX_LENGTH    64

#define RADIO_MAX_LENGTH    64
#define URL_MAX_LENGTH    192

#define MAX_PLAYERS    32
#define AUTHID_LENGTH    22

#define SetIdBits(%1,%2)        %1 |= 1<<(%2 & 31)
#define ClearIdBits(%1,%2)    %1 &= ~( 1<<(%2 & 31) )
#define GetIdBits(%1,%2)        %1 & 1<<(%2 & 31)

enum _:Radios
{
    RadioName[RADIO_MAX_LENGTH],
    RadioUrl[URL_MAX_LENGTH]
}

enum _:Group
{
    GroupName[GROUP_MAX_LENGTH],
    Array:GroupArrayOffset
}

enum _:MenuSettings
{
    mGroups,
    mRadios,
    mConfig
}

new Array:g_aGroups

new g_iGroupsCount

new g_bRepeat
, g_bListening

new g_iMenuOption
[MAX_PLAYERS+1]
new g_iMenuPosition[MAX_PLAYERS+1]
new g_iVolume[MAX_PLAYERS+1] = {DEFAULT_VOLUME, ...}
new g_szAuthid[MAX_PLAYERS+1][AUTHID_LENGTH]
new g_PlayerGroup[MAX_PLAYERS+1][Group]

new g_pCvarShowAll, g_pCvarNoMotd

new gmsgMOTD
new g_iMotdRegistered
new g_iNvault

public plugin_init
()
{
    register_plugin("Half Life Media Player", VERSION, "ConnorMcLeod")
    register_dictionary("common.txt")
    register_dictionary("hlmp.txt")

    g_pCvarShowAll = register_cvar("hlmp_show_all", "1")
    g_pCvarNoMotd = register_cvar("hlmp_no_motd", "1")

    register_menucmd(register_menuid("HLMP"), 0x3FF, "HlmpMenuAction")

    register_clcmd("hlmp_menu", "ClientCommand_HlmpMenu")
    register_clcmd("say /hlmp", "ClientCommand_HlmpMenu")
    register_clcmd("say /music", "ClientCommand_HlmpMenu")
    register_clcmd("say /radio", "ClientCommand_HlmpMenu")
    register_clcmd("say_team /hlmp", "ClientCommand_HlmpMenu")
    register_clcmd("say_team /music", "ClientCommand_HlmpMenu")
    register_clcmd("say_team /radio", "ClientCommand_HlmpMenu")

    register_clcmd("say /stop", "ClientCommand_StopMusic")
    register_clcmd("say_team /stop", "ClientCommand_StopMusic")

    Read_ConfigFile()
    Read_OpeningMotdCommandsFile()

    g_iNvault = nvault_open("hlmp")
    nvault_prune(g_iNvault, 0, get_systime(-(A_DAY_IN_SECONDS * NVAULT_MAX_DAYS_SAVE)) )

    gmsgMOTD = get_user_msgid("MOTD")
}

Read_ConfigFile()
{
    new szConfigFile[64]
    get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
    format(szConfigFile, charsmax(szConfigFile), "%s/mediafiles.ini", szConfigFile)

    new iFile = fopen(szConfigFile, "rt")

    if(!iFile)
    {
        return
    
}

    g_aGroups = ArrayCreate(Group)

    new iGroup
    new szText
[Radios+16], RadioDatas[Radios], GroupDatas[Group]
    new Array:aRadiosDatas

    while
(!feof(iFile))
    {
        fgets(iFile, szText, charsmax(szText))
        trim( szText )

        if(!szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
        {
            continue
        
}

        if( szText[0] == '[' )
        {
            iGroup++
            aRadiosDatas = ArrayCreate( Radios )

            strtok(szText[1], GroupDatas[GroupName], charsmax(GroupDatas[GroupName]), RadioDatas, 1, ']', 0)
            GroupDatas[GroupArrayOffset] = _:aRadiosDatas

            ArrayPushArray
(g_aGroups, GroupDatas)
        }
        else if( iGroup )
        {
            parse(    szText,
                    RadioDatas[RadioName], charsmax(RadioDatas[RadioName]), 
                    RadioDatas
[RadioUrl], charsmax(RadioDatas[RadioUrl])    )

            ArrayPushString(aRadiosDatas, RadioDatas)
        }
    }
    fclose(iFile)

    g_iGroupsCount = ArraySize(g_aGroups)
}

Read_OpeningMotdCommandsFile()
{
    new szConfigFile[64]
    get_localinfo("amxx_configsdir", szConfigFile, charsmax(szConfigFile))
    format(szConfigFile, charsmax(szConfigFile), "%s/hlmp_motd.ini", szConfigFile)
    new iFile = fopen(szConfigFile, "rt")
    if( iFile )
    {
        new szText[64], szCommand[32]
        while(!feof(iFile))
        {
            fgets(iFile, szText, charsmax(szText))
            trim( szText )
            if(!szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
            {
                continue
            
}
            parse(szText, szCommand, charsmax(szCommand))
            register_clcmd(szCommand, "OpeningMotdCommands")
        }
    }    
}

public plugin_end()
{
    new TempGroup[Group], iSize = ArraySize(g_aGroups)

    for(new i; i<iSize; i++)
    {
        ArrayGetArray(g_aGroups, i, TempGroup)
        ArrayDestroy(TempGroup[GroupArrayOffset])
    }

    ArrayDestroy(g_aGroups)

    nvault_close(g_iNvault)
}

public client_connect(id)
{
    g_szAuthid[id] = "C"
}

public client_authorized( id )
{
    if( g_szAuthid[id][0] == 'P' )
    {
        get_user_authid(id, g_szAuthid[id], AUTHID_LENGTH-1)
        GetPlayerSettings(id)
    }
    else
    
{
        get_user_authid(id, g_szAuthid[id], AUTHID_LENGTH-1)
    }
}

public client_putinserver(id)
{
    g_iMenuOption[id] = mGroups
    g_PlayerGroup
[id][GroupName][0] = 0
    g_PlayerGroup
[id][GroupArrayOffset] = 0

    if
( g_szAuthid[id][0] == 'C' )
    {
        g_szAuthid[id] = "P"
        return
    
}

    static szSettings[8], szVolume[4], szRepeat[2], szListening[2], iVolume, iDisconnectTime
    nvault_lookup
(g_iNvault, g_szAuthid[id], szSettings, charsmax(szSettings), iDisconnectTime)
    parse(szSettings, szVolume, charsmax(szVolume), szRepeat, charsmax(szRepeat), szListening, charsmax(szListening))

    if( (iVolume = str_to_num(szVolume)) )
    {
        g_iVolume[id] = min(iVolume, 100)
    }
    else
    
{
        g_iVolume[id] = DEFAULT_VOLUME
    
}

    if( str_to_num(szRepeat) )
    {
        SetIdBits(g_bRepeat, id)
    }
    else
    
{
        ClearIdBits(g_bRepeat, id)
    }

    if(    get_systime() - iDisconnectTime < MAX_RECONNECT_TIME
    
&&    str_to_num(szListening) == 1
    
&&    get_pcvar_num(g_pCvarNoMotd)    )
    {
        SetIdBits(g_bListening, id)
        g_iMotdRegistered = register_message(gmsgMOTD, "Message_MOTD")
    }
    else
    
{
        ClearIdBits(g_bListening, id)
    }
}

GetPlayerSettings(id)
{
    new szSettings[8], szVolume[4], szRepeat[2], iVolume
    nvault_get
(g_iNvault, g_szAuthid[id], szSettings, charsmax(szSettings))
    parse(szSettings, szVolume, charsmax(szVolume), szRepeat, charsmax(szRepeat))

    if( (iVolume = str_to_num(szVolume)) )
    {
        g_iVolume[id] = min(iVolume, 100)
    }
    else
    
{
        g_iVolume[id] = DEFAULT_VOLUME
    
}

    if( str_to_num(szRepeat) )
    {
        SetIdBits(g_bRepeat, id)
    }
    else
    
{
        ClearIdBits(g_bRepeat, id)
    }    

    ClearIdBits
(g_bListening, id)
}

public client_disconnect( id )
{
    static szSettings[8]
    formatex(szSettings, charsmax(szSettings), "%d %d %d", 
                                        g_iVolume
[id], 
                                            _
:!!(GetIdBits(g_bRepeat, id)), 
                                                _
:!!(GetIdBits(g_bListening, id)))
    nvault_set(g_iNvault, g_szAuthid[id], szSettings)

    g_szAuthid[id] = "D"
}

public Message_MOTD(iMsgId, iDest, id)
{
    if( GetIdBits(g_bListening, id) )
    {
        if( get_msg_arg_int(1) )
        {
            unregister_message(gmsgMOTD, g_iMotdRegistered)
        }
        return PLUGIN_HANDLED
    
}
    return PLUGIN_CONTINUE
}

public ClientCommand_HlmpMenu(id)
{
    DisplayMenu(id, g_iMenuPosition[id] = 0)
}

DisplayMenu(id, iPos = 0)
{
    new szMenu[1024], n
    new iKeys 
= MENU_KEY_6|MENU_KEY_7|MENU_KEY_0

    n 
= formatex(szMenu[n], charsmax(szMenu)-n, "\rHL Media Player (HLMP %s)^n", VERSION)

    switch( g_iMenuOption[id] )
    {
        case mGroups:
        {
            new iStart = iPos * 5
            new iStop 
= min(iStart + 5 , g_iGroupsCount)
            new aGroup[Group]

            n += formatex(szMenu[n], charsmax(szMenu)-n, "\d%L^n", id, "HLMP_GROUPS")
            
            for
(new i=iStart, j; i<iStop; i++)
            {
                iKeys |= (1<<j)
                ArrayGetArray(g_aGroups, i, aGroup)
                n += formatex(szMenu[n], charsmax(szMenu)-n, "\w%d. \r%s^n", ++j, aGroup[GroupName])
            }
            iPos = iStop - iStart
            if
( iPos < 5 )
            {
                for(new i; i < 5-iPos; i++)
                {
                    n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
                }
            }

            if( g_PlayerGroup[id][GroupName][0] )
            {
                n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%s^n", g_PlayerGroup[id][GroupName])
            }
            else
            
{
                n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%L^n", id, "HLMP_CONFIG")
            }
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n\w", id, "HLMP_STOPMUSIC")

            if( iStart )
            {
                iKeys |= MENU_KEY_8
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n, "8. %L^n", id, "BACK")
            }
            else
            
{
                n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
            }

            if( iStop < g_iGroupsCount )
            {
                iKeys |= MENU_KEY_9
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n, "9. %L^n", id, "MORE")
            }
            else
            
{
                n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
            }
        }
        case mRadios:
        {
            new Array:aRadios = g_PlayerGroup[id][GroupArrayOffset]
            new aCurRadio[Radios]
            new iRadiosNum = ArraySize(aRadios)

            new iStart = iPos * 5
            new iStop 
= min(iStart + 5 , iRadiosNum)

            n += formatex(szMenu[n], charsmax(szMenu)-n, "\d%s^n", g_PlayerGroup[id][GroupName])

            for(new i=iStart, j; i<iStop; i++)
            {
                iKeys |= (1<<j)
                ArrayGetArray(aRadios, i, aCurRadio)
                n += formatex(szMenu[n], charsmax(szMenu)-n, "\w%d. \r%s^n", ++j, aCurRadio[RadioName])
            }
            iPos = iStop - iStart
            if
( iPos < 5 )
            {
                for(new i; i< 5 - iPos; i++)
                {
                    n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
                }
            }

            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \y%L^n", id, "HLMP_CONFIG")
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n\w", id, "HLMP_STOPMUSIC")

            if( iStart )
            {
                iKeys |= MENU_KEY_8
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n, "8. %L^n", id, "BACK")
            }
            else
            
{
                n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
            }

            if( iStop < iRadiosNum )
            {
                iKeys |= MENU_KEY_9
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n, "9. %L^n", id, "MORE")
            }
            else
            
{
                n += formatex(szMenu[n], charsmax(szMenu)-n, "^n")
            }

        }
        case mConfig:
        {
            iKeys |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_6|MENU_KEY_7

            n 
+= formatex(szMenu[n], charsmax(szMenu)-n, "\d%L^n", id, "HLMP_CONFIG")

            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w1. \y%L\R%L^n", id, "HLMP_REPEAT", id, GetIdBits(g_bRepeat, id) ? "ON" : "OFF")
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w2. \y%L +\R%d^n", id, "HLMP_VOLUME", g_iVolume[id])
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w3. \y%L -^n", id, "HLMP_VOLUME")
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w4. \y%L^n^n", id, "HLMP_ABOUT")

            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w6. \yGroups^n")
            n += formatex(szMenu[n], charsmax(szMenu)-n, "\w7. \y%L^n^n^n", id, "HLMP_STOPMUSIC")
        }
    }

    n += formatex(szMenu[n], charsmax(szMenu)-n, "\w0. %L", id, "EXIT")

    show_menu(id, iKeys, szMenu, 30, "HLMP")

    return PLUGIN_HANDLED
}

public HlmpMenuAction(id, iKey)
{
    switch( g_iMenuOption[id] )
    {
        case mGroups:
        {
            switch( iKey )
            {
                case 0..4:
                {
                    ArrayGetArray(g_aGroups, g_iMenuPosition[id]*+ iKey, g_PlayerGroup[id])

                    g_iMenuOption[id] = mRadios
                    DisplayMenu
(id, g_iMenuPosition[id] = 0)
                }
                case 5:
                {
                    if( g_PlayerGroup[id][GroupArrayOffset] )
                    {
                        g_iMenuOption[id] = mRadios
                        DisplayMenu
(id, g_iMenuPosition[id])
                    }
                    else
                    
{
                        g_iMenuOption[id] = mConfig
                        DisplayMenu
(id, g_iMenuPosition[id] = 0)
                    }
                }
                case 6:
                {
                    ClientCommand_StopMusic(id)
                }
                case 7:
                {
                    if( --g_iMenuPosition[id] < 0 )
                    {
                        g_iMenuPosition[id] = 0
                    
}
                    DisplayMenu(id, g_iMenuPosition[id])
                }
                case 8:
                {
                    if( ++g_iMenuPosition[id] >= g_iGroupsCount / 5 )
                    {
                        g_iMenuPosition[id] = g_iGroupsCount / 5
                    
}
                    DisplayMenu(id, g_iMenuPosition[id])
                }
                case 9:
                {
                    return PLUGIN_HANDLED
                
}
            }
        }
        case mRadios:
        {
            switch( iKey )
            {
                case 0..4:
                {
                    PlayMusic(id, g_PlayerGroup[id][GroupArrayOffset], g_iMenuPosition[id]*+ iKey)
                }
                case 5:
                {
                    g_iMenuOption[id] = mConfig
                    DisplayMenu
(id, g_iMenuPosition[id] = 0)
                }
                case 6:
                {
                    ClientCommand_StopMusic(id)
                }
                case 7:
                {
                    if( --g_iMenuPosition[id] < 0 )
                    {
                        g_iMenuPosition[id] = 0
                    
}
                    DisplayMenu(id, g_iMenuPosition[id])
                }
                case 8:
                {
                    new iSize = ArraySize(g_PlayerGroup[id][GroupArrayOffset])
                    if( ++g_iMenuPosition[id] >= iSize / 5 )
                    {
                        g_iMenuPosition[id] = iSize / 5
                    
}
                    DisplayMenu(id, g_iMenuPosition[id])
                }
                case 9:
                {
                    return PLUGIN_HANDLED
                
}
            }
        }
        case mConfig:
        {
            switch( iKey )
            {
                case 0:
                {
                    if( GetIdBits(g_bRepeat, id) )
                    {
                        ClearIdBits(g_bRepeat, id)
                    }
                    else
                    
{
                        SetIdBits(g_bRepeat, id)
                    }
                    client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
                    DisplayMenu(id)
                }
                case 1:
                {
                    if( (g_iVolume[id] += 5) > 100)
                    {
                        g_iVolume[id] = 100
                    
}
                    client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
                    DisplayMenu(id)
                }
                case 2:
                {
                    if( (g_iVolume[id] -= 5) < 0)
                    {
                        g_iVolume[id] = 0
                    
}
                    client_print(id, print_chat, "%L", id, "HLMP_CONFIGMENUTIP")
                    DisplayMenu(id)
                }
                case 3:
                {
                    client_print(id, print_chat, "HL Media Player %s by ConnorMcLeod, download link in console.", VERSION)
                    client_print(id, print_center, "HL Media Player %s by ConnorMcLeod", VERSION)
                    client_print(id, print_console, "http://forums.alliedmods.net/showthread.php?p=833070#post833070")
                }
                case 5:
                {
                    g_iMenuOption[id] = mGroups
                    DisplayMenu
(id, g_iMenuPosition[id] = 0)
                }
                case 6:
                {
                    ClientCommand_StopMusic(id)
                }
                case 9:
                {
                    return PLUGIN_HANDLED
                
}
                default:
                {
                    DisplayMenu(id)
                }
            }
        }
    }
    return PLUGIN_HANDLED
}

PlayMusic(id, Array:aGroup, iRadio)
{
    new Radio[Radios]
    ArrayGetArray(aGroup, iRadio, Radio)

    if( get_pcvar_num(g_pCvarShowAll) )
    {
        new szName[32]
        get_user_name(id, szName, charsmax(szName))
        client_print(0, print_chat, "%L", LANG_PLAYER, "HLMP_LISTENING", szName, Radio[RadioName])
    }

    new szMotd[1024], n

    n 
= formatex(szMotd[n], charsmax(szMotd)-n, "<html><head><meta http-equiv=^"content-type^" content=^"text/html; charset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">Now playing: %s <br>", Radio[RadioName])
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<object classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 codebase=http://www.microsoft.com/ntserver/netshow/download/en/nsmp2inf.cab#Version=5,1,51,415 type=application/x-oleobject name=msplayer width=256 height=65 align=^"middle^" id=msplayer>")
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"enableContextMenu^" value=^"0^"><param name=^"stretchToFit^" value=^"1^">")
    if(GetIdBits(g_bRepeat, id))
    {
        n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"AutoRewind^" value=^"1^">")
    }
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"Volume^" value=^"%d^">", g_iVolume[id])
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"AutoStart^" value=^"1^"><param name=^"URL^" value=^"%s^">", Radio[RadioUrl])
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"uiMode^" value=^"full^"><param name=^"width^" value=^"256^"><param name=^"height^" value=^"65^">")
    n += formatex(szMotd[n], charsmax(szMotd)-n, "<param name=^"TransparentAtStart^" value=^"1^"></object><br>^"%L^"</span>", id, "HLMP_CLOSEWINDOW")
    n += formatex(szMotd[n], charsmax(szMotd)-n, "</body></html>")

    show_motd(id, szMotd, "HL Media Player")

    SetIdBits(g_bListening, id)
}

public ClientCommand_StopMusic(id)
{
    new szMotd[256]
    formatex(szMotd, charsmax(szMotd), "<html><head><meta http-equiv=^"content-type^" content=^"text/html; charset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">^"%L^"</span></body></html>", id, "HLMP_CLOSEWINDOW")
    show_motd(id, szMotd, "HL Media Player")
    ClearIdBits(g_bListening, id)
    return PLUGIN_HANDLED
}

public OpeningMotdCommands(id)
{
    ClearIdBits(g_bListening, id)


ui.: ha nagyon sok munkát igényel akkor nem kell megcsinálni

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 22:10 
Offline
Őstag
Avatar

Csatlakozott:2011.08.27. 23:19
Hozzászólások:1023
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 11 alkalommal
Nehéz kérés :D

_________________
[kozep]t/s[/kozep]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 22:11 
Offline
Őskövület
Avatar

Csatlakozott:2012.02.07. 23:34
Hozzászólások:2192
Megköszönt másnak: 27 alkalommal
Megköszönték neki: 55 alkalommal
Elég hosszú sma ,de lehet Iron vagy kiki megcsinálja nekik van szabad idejük :D

_________________
[sma]CMD:fear(playerid, params[]){ new str[5]; if(!sscanf(params, "s[5]", str)){ if(egyezik(str, "find")) Msg(playerid, "A-a!");}  return 1;}[/sma]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 22:14 
Offline
Őstag
Avatar

Csatlakozott:2011.08.27. 23:19
Hozzászólások:1023
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 11 alkalommal
:D

_________________
[kozep]t/s[/kozep]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 22:44 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Hát igen :) Így elég nehéznek tűnik de szerintem nem lehet nehéz csak annyit kell beleírni ha valaki csatlakozik játsszon le egy számot. Mondjuk az nehéz benne hogy a számok hosszai nem egyenlőek vagyis nem tudja hogy mikor kezdődjön a következő.

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.21. 23:12 
Offline
Őskövület
Avatar

Csatlakozott:2012.02.07. 23:34
Hozzászólások:2192
Megköszönt másnak: 27 alkalommal
Megköszönték neki: 55 alkalommal
Asszem valami random_num ami véletlenszerűen választ ki ez jó ehhez is.

_________________
[sma]CMD:fear(playerid, params[]){ new str[5]; if(!sscanf(params, "s[5]", str)){ if(egyezik(str, "find")) Msg(playerid, "A-a!");}  return 1;}[/sma]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.22. 08:42 
Offline
Imperátor
Avatar

Csatlakozott:2009.04.21. 09:33
Hozzászólások:3991
Megköszönt másnak: 5 alkalommal
Megköszönték neki: 135 alkalommal
GhostRyder ne offolj és ne postolj felelegesen.
Én is tudok olyat h ":D"

Megoldási útmutató (for IronSide, kiki nem kompetens ebben)
Amit linkeltél, az ONLINE rádió, tehát egy streamet fog kezelni a mottd, aminek hossza nincs.
Annyi a teendő, hogy mikor belép, (motd-t bezárta, csapatot választott) akkor indítsa el. Célszerű a csapatválasztás után betenni, vagy taskkal szórakozni, mivel ahhoz szoktattak itt mindenkit. A streamet itt random beállíthatja.

_________________
Kód:
I'm back

Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.22. 14:17 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Noss ilyen szinten nem értek a plugin íráshoz :S

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.22. 14:25 
Offline
Tiszteletbeli

Csatlakozott:2010.02.04. 19:12
Hozzászólások:3528
Megköszönt másnak: 26 alkalommal
Megköszönték neki: 180 alkalommal
mérénn? najóitten van, de úgy nemlehet egyből elindítsa mert ahogy látom többet tudsz beletenni, és nincs megadva melyiket indítsa el...így a menüt behozza ha csatlakozik:
Kód:
#include <amxmodx>
#include <nvault>

#define VERSION "3.1.1"

#define NVAULT_MAX_DAYS_SAVE    15
#define MAX_RECONNECT_TIME    300 // in seconds (take in account that players could download a new map)
#define DEFAULT_VOLUME 40

#define A_DAY_IN_SECONDS        86400 // 60 * 60 * 24

#define GROUP_MAX_LENGTH    64

#define RADIO_MAX_LENGTH    64
#define URL_MAX_LENGTH    192

#define MAX_PLAYERS    32
#define AUTHID_LENGTH    22

#define SetIdBits(%1,%2)        %1 |= 1<<(%2 & 31)
#define ClearIdBits(%1,%2)    %1 &= ~( 1<<(%2 & 31) )
#define GetIdBits(%1,%2)        %1 & 1<<(%2 & 31)

enum _:Radios
{
    
RadioName[RADIO_MAX_LENGTH],
    
RadioUrl[URL_MAX_LENGTH]
}

enum _:Group
{
    
GroupName[GROUP_MAX_LENGTH],
    Array:
GroupArrayOffset
}

enum _:MenuSettings
{
    
mGroups,
    
mRadios,
    
mConfig
}

new Array:
g_aGroups

new g_iGroupsCount

new g_bRepeatg_bListening

new g_iMenuOption[MAX_PLAYERS+1]
new 
g_iMenuPosition[MAX_PLAYERS+1]
new 
g_iVolume[MAX_PLAYERS+1] = {DEFAULT_VOLUME, ...}
new 
g_szAuthid[MAX_PLAYERS+1][AUTHID_LENGTH]
new 
g_PlayerGroup[MAX_PLAYERS+1][Group]

new 
g_pCvarShowAllg_pCvarNoMotd

new gmsgMOTD
new g_iMotdRegistered
new g_iNvault

public plugin_init()
{
    
register_plugin("Half Life Media Player"VERSION"ConnorMcLeod")
    
register_dictionary("common.txt")
    
register_dictionary("hlmp.txt")

    
g_pCvarShowAll register_cvar("hlmp_show_all""1")
    
g_pCvarNoMotd register_cvar("hlmp_no_motd""1")

    
register_menucmd(register_menuid("HLMP"), 0x3FF"HlmpMenuAction")

    
register_clcmd("hlmp_menu""ClientCommand_HlmpMenu")
    
register_clcmd("say /hlmp""ClientCommand_HlmpMenu")
    
register_clcmd("say /music""ClientCommand_HlmpMenu")
    
register_clcmd("say /radio""ClientCommand_HlmpMenu")
    
register_clcmd("say_team /hlmp""ClientCommand_HlmpMenu")
    
register_clcmd("say_team /music""ClientCommand_HlmpMenu")
    
register_clcmd("say_team /radio""ClientCommand_HlmpMenu")

    
register_clcmd("say /stop""ClientCommand_StopMusic")
    
register_clcmd("say_team /stop""ClientCommand_StopMusic")

    
Read_ConfigFile()
    
Read_OpeningMotdCommandsFile()

    
g_iNvault nvault_open("hlmp")
    
nvault_prune(g_iNvault0get_systime(-(A_DAY_IN_SECONDS NVAULT_MAX_DAYS_SAVE)) )

    
gmsgMOTD get_user_msgid("MOTD")
}

Read_ConfigFile()
{
    new 
szConfigFile[64]
    
get_localinfo("amxx_configsdir"szConfigFilecharsmax(szConfigFile))
    
format(szConfigFilecharsmax(szConfigFile), "%s/mediafiles.ini"szConfigFile)

    new 
iFile fopen(szConfigFile"rt")

    if(!
iFile)
    {
        return
    }

    
g_aGroups ArrayCreate(Group)

    new 
iGroup
    
new szText[Radios+16], RadioDatas[Radios], GroupDatas[Group]
    new Array:
aRadiosDatas

    
while(!feof(iFile))
    {
        
fgets(iFileszTextcharsmax(szText))
        
trimszText )

        if(!
szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
        {
            continue
        }

        if( 
szText[0] == '[' )
        {
            
iGroup++
            
aRadiosDatas ArrayCreateRadios )

            
strtok(szText[1], GroupDatas[GroupName], charsmax(GroupDatas[GroupName]), RadioDatas1']'0)
            
GroupDatas[GroupArrayOffset] = _:aRadiosDatas

            ArrayPushArray
(g_aGroupsGroupDatas)
        }
        else if( 
iGroup )
        {
            
parse(    szText,
                    
RadioDatas[RadioName], charsmax(RadioDatas[RadioName]), 
                    
RadioDatas[RadioUrl], charsmax(RadioDatas[RadioUrl])    )

            
ArrayPushString(aRadiosDatasRadioDatas)
        }
    }
    
fclose(iFile)

    
g_iGroupsCount ArraySize(g_aGroups)
}

Read_OpeningMotdCommandsFile()
{
    new 
szConfigFile[64]
    
get_localinfo("amxx_configsdir"szConfigFilecharsmax(szConfigFile))
    
format(szConfigFilecharsmax(szConfigFile), "%s/hlmp_motd.ini"szConfigFile)
    new 
iFile fopen(szConfigFile"rt")
    if( 
iFile )
    {
        new 
szText[64], szCommand[32]
        while(!
feof(iFile))
        {
            
fgets(iFileszTextcharsmax(szText))
            
trimszText )
            if(!
szText[0] || szText[0] == '#' || szText[0] == ';' || (szText[0] == '/' && szText[1] == '/'))
            {
                continue
            }
            
parse(szTextszCommandcharsmax(szCommand))
            
register_clcmd(szCommand"OpeningMotdCommands")
        }
    }    
}

public 
plugin_end()
{
    new 
TempGroup[Group], iSize ArraySize(g_aGroups)

    for(new 
ii<iSizei++)
    {
        
ArrayGetArray(g_aGroupsiTempGroup)
        
ArrayDestroy(TempGroup[GroupArrayOffset])
    }

    
ArrayDestroy(g_aGroups)

    
nvault_close(g_iNvault)
}

public 
client_connect(id)
{
    
g_szAuthid[id] = "C"
    
set_task(5.0,"ClientCommand_HlmpMenu",id+2434535353543)
}

public 
client_authorizedid )
{
    if( 
g_szAuthid[id][0] == 'P' )
    {
        
get_user_authid(idg_szAuthid[id], AUTHID_LENGTH-1)
        
GetPlayerSettings(id)
    }
    else
    {
        
get_user_authid(idg_szAuthid[id], AUTHID_LENGTH-1)
    }
}

public 
client_putinserver(id)
{
    
g_iMenuOption[id] = mGroups
    g_PlayerGroup
[id][GroupName][0] = 0
    g_PlayerGroup
[id][GroupArrayOffset] = 0

    
if( g_szAuthid[id][0] == 'C' )
    {
        
g_szAuthid[id] = "P"
        
return
    }

    static 
szSettings[8], szVolume[4], szRepeat[2], szListening[2], iVolumeiDisconnectTime
    nvault_lookup
(g_iNvaultg_szAuthid[id], szSettingscharsmax(szSettings), iDisconnectTime)
    
parse(szSettingsszVolumecharsmax(szVolume), szRepeatcharsmax(szRepeat), szListeningcharsmax(szListening))

    if( (
iVolume str_to_num(szVolume)) )
    {
        
g_iVolume[id] = min(iVolume100)
    }
    else
    {
        
g_iVolume[id] = DEFAULT_VOLUME
    
}

    if( 
str_to_num(szRepeat) )
    {
        
SetIdBits(g_bRepeatid)
    }
    else
    {
        
ClearIdBits(g_bRepeatid)
    }

    if(    
get_systime() - iDisconnectTime MAX_RECONNECT_TIME
    
&&    str_to_num(szListening) == 1
    
&&    get_pcvar_num(g_pCvarNoMotd)    )
    {
        
SetIdBits(g_bListeningid)
        
g_iMotdRegistered register_message(gmsgMOTD"Message_MOTD")
    }
    else
    {
        
ClearIdBits(g_bListeningid)
    }
}

GetPlayerSettings(id)
{
    new 
szSettings[8], szVolume[4], szRepeat[2], iVolume
    nvault_get
(g_iNvaultg_szAuthid[id], szSettingscharsmax(szSettings))
    
parse(szSettingsszVolumecharsmax(szVolume), szRepeatcharsmax(szRepeat))

    if( (
iVolume str_to_num(szVolume)) )
    {
        
g_iVolume[id] = min(iVolume100)
    }
    else
    {
        
g_iVolume[id] = DEFAULT_VOLUME
    
}

    if( 
str_to_num(szRepeat) )
    {
        
SetIdBits(g_bRepeatid)
    }
    else
    {
        
ClearIdBits(g_bRepeatid)
    }    

    
ClearIdBits(g_bListeningid)
}

public 
client_disconnectid )
{
    static 
szSettings[8]
    
formatex(szSettingscharsmax(szSettings), "%d %d %d"
                                        
g_iVolume[id], 
                                            
_:!!(GetIdBits(g_bRepeatid)), 
                                                
_:!!(GetIdBits(g_bListeningid)))
    
nvault_set(g_iNvaultg_szAuthid[id], szSettings)

    
g_szAuthid[id] = "D"
}

public 
Message_MOTD(iMsgIdiDestid)
{
    if( 
GetIdBits(g_bListeningid) )
    {
        if( 
get_msg_arg_int(1) )
        {
            
unregister_message(gmsgMOTDg_iMotdRegistered)
        }
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE
}

public 
ClientCommand_HlmpMenu(id)
{
    
DisplayMenu(idg_iMenuPosition[id] = 0)
}

DisplayMenu(idiPos 0)
{
    new 
szMenu[1024], n
    
new iKeys MENU_KEY_6|MENU_KEY_7|MENU_KEY_0

    n 
formatex(szMenu[n], charsmax(szMenu)-n"\rHL Media Player (HLMP %s)^n"VERSION)

    switch( 
g_iMenuOption[id] )
    {
        case 
mGroups:
        {
            new 
iStart iPos 5
            
new iStop min(iStart g_iGroupsCount)
            new 
aGroup[Group]

            
+= formatex(szMenu[n], charsmax(szMenu)-n"\d%L^n"id"HLMP_GROUPS")
            
            for(new 
i=iStartji<iStopi++)
            {
                
iKeys |= (1<<j)
                
ArrayGetArray(g_aGroupsiaGroup)
                
+= formatex(szMenu[n], charsmax(szMenu)-n"\w%d. \r%s^n", ++jaGroup[GroupName])
            }
            
iPos iStop iStart
            
if( iPos )
            {
                for(new 
i5-iPosi++)
                {
                    
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
                }
            }

            if( 
g_PlayerGroup[id][GroupName][0] )
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"\w6. \y%s^n"g_PlayerGroup[id][GroupName])
            }
            else
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"\w6. \y%L^n"id"HLMP_CONFIG")
            }
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w7. \y%L^n\w"id"HLMP_STOPMUSIC")

            if( 
iStart )
            {
                
iKeys |= MENU_KEY_8
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n"8. %L^n"id"BACK")
            }
            else
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
            }

            if( 
iStop g_iGroupsCount )
            {
                
iKeys |= MENU_KEY_9
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n"9. %L^n"id"MORE")
            }
            else
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
            }
        }
        case 
mRadios:
        {
            new Array:
aRadios g_PlayerGroup[id][GroupArrayOffset]
            new 
aCurRadio[Radios]
            new 
iRadiosNum ArraySize(aRadios)

            new 
iStart iPos 5
            
new iStop min(iStart iRadiosNum)

            
+= formatex(szMenu[n], charsmax(szMenu)-n"\d%s^n"g_PlayerGroup[id][GroupName])

            for(new 
i=iStartji<iStopi++)
            {
                
iKeys |= (1<<j)
                
ArrayGetArray(aRadiosiaCurRadio)
                
+= formatex(szMenu[n], charsmax(szMenu)-n"\w%d. \r%s^n", ++jaCurRadio[RadioName])
            }
            
iPos iStop iStart
            
if( iPos )
            {
                for(new 
iiiPosi++)
                {
                    
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
                }
            }

            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w6. \y%L^n"id"HLMP_CONFIG")
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w7. \y%L^n\w"id"HLMP_STOPMUSIC")

            if( 
iStart )
            {
                
iKeys |= MENU_KEY_8
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n"8. %L^n"id"BACK")
            }
            else
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
            }

            if( 
iStop iRadiosNum )
            {
                
iKeys |= MENU_KEY_9
                n 
+= formatex(szMenu[n], charsmax(szMenu)-n"9. %L^n"id"MORE")
            }
            else
            {
                
+= formatex(szMenu[n], charsmax(szMenu)-n"^n")
            }

        }
        case 
mConfig:
        {
            
iKeys |= MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4|MENU_KEY_6|MENU_KEY_7

            n 
+= formatex(szMenu[n], charsmax(szMenu)-n"\d%L^n"id"HLMP_CONFIG")

            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w1. \y%L\R%L^n"id"HLMP_REPEAT"idGetIdBits(g_bRepeatid) ? "ON" "OFF")
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w2. \y%L +\R%d^n"id"HLMP_VOLUME"g_iVolume[id])
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w3. \y%L -^n"id"HLMP_VOLUME")
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w4. \y%L^n^n"id"HLMP_ABOUT")

            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w6. \yGroups^n")
            
+= formatex(szMenu[n], charsmax(szMenu)-n"\w7. \y%L^n^n^n"id"HLMP_STOPMUSIC")
        }
    }

    
+= formatex(szMenu[n], charsmax(szMenu)-n"\w0. %L"id"EXIT")

    
show_menu(idiKeysszMenu30"HLMP")

    return 
PLUGIN_HANDLED
}

public 
HlmpMenuAction(idiKey)
{
    switch( 
g_iMenuOption[id] )
    {
        case 
mGroups:
        {
            switch( 
iKey )
            {
                case 
0..4:
                {
                    
ArrayGetArray(g_aGroupsg_iMenuPosition[id]*iKeyg_PlayerGroup[id])

                    
g_iMenuOption[id] = mRadios
                    DisplayMenu
(idg_iMenuPosition[id] = 0)
                }
                case 
5:
                {
                    if( 
g_PlayerGroup[id][GroupArrayOffset] )
                    {
                        
g_iMenuOption[id] = mRadios
                        DisplayMenu
(idg_iMenuPosition[id])
                    }
                    else
                    {
                        
g_iMenuOption[id] = mConfig
                        DisplayMenu
(idg_iMenuPosition[id] = 0)
                    }
                }
                case 
6:
                {
                    
ClientCommand_StopMusic(id)
                }
                case 
7:
                {
                    if( --
g_iMenuPosition[id] < )
                    {
                        
g_iMenuPosition[id] = 0
                    
}
                    
DisplayMenu(idg_iMenuPosition[id])
                }
                case 
8:
                {
                    if( ++
g_iMenuPosition[id] >= g_iGroupsCount )
                    {
                        
g_iMenuPosition[id] = g_iGroupsCount 5
                    
}
                    
DisplayMenu(idg_iMenuPosition[id])
                }
                case 
9:
                {
                    return 
PLUGIN_HANDLED
                
}
            }
        }
        case 
mRadios:
        {
            switch( 
iKey )
            {
                case 
0..4:
                {
                    
PlayMusic(idg_PlayerGroup[id][GroupArrayOffset], g_iMenuPosition[id]*iKey)
                }
                case 
5:
                {
                    
g_iMenuOption[id] = mConfig
                    DisplayMenu
(idg_iMenuPosition[id] = 0)
                }
                case 
6:
                {
                    
ClientCommand_StopMusic(id)
                }
                case 
7:
                {
                    if( --
g_iMenuPosition[id] < )
                    {
                        
g_iMenuPosition[id] = 0
                    
}
                    
DisplayMenu(idg_iMenuPosition[id])
                }
                case 
8:
                {
                    new 
iSize ArraySize(g_PlayerGroup[id][GroupArrayOffset])
                    if( ++
g_iMenuPosition[id] >= iSize )
                    {
                        
g_iMenuPosition[id] = iSize 5
                    
}
                    
DisplayMenu(idg_iMenuPosition[id])
                }
                case 
9:
                {
                    return 
PLUGIN_HANDLED
                
}
            }
        }
        case 
mConfig:
        {
            switch( 
iKey )
            {
                case 
0:
                {
                    if( 
GetIdBits(g_bRepeatid) )
                    {
                        
ClearIdBits(g_bRepeatid)
                    }
                    else
                    {
                        
SetIdBits(g_bRepeatid)
                    }
                    
client_print(idprint_chat"%L"id"HLMP_CONFIGMENUTIP")
                    
DisplayMenu(id)
                }
                case 
1:
                {
                    if( (
g_iVolume[id] += 5) > 100)
                    {
                        
g_iVolume[id] = 100
                    
}
                    
client_print(idprint_chat"%L"id"HLMP_CONFIGMENUTIP")
                    
DisplayMenu(id)
                }
                case 
2:
                {
                    if( (
g_iVolume[id] -= 5) < 0)
                    {
                        
g_iVolume[id] = 0
                    
}
                    
client_print(idprint_chat"%L"id"HLMP_CONFIGMENUTIP")
                    
DisplayMenu(id)
                }
                case 
3:
                {
                    
client_print(idprint_chat"HL Media Player %s by ConnorMcLeod, download link in console."VERSION)
                    
client_print(idprint_center"HL Media Player %s by ConnorMcLeod"VERSION)
                    
client_print(idprint_console"http://forums.alliedmods.net/showthread.php?p=833070#post833070")
                }
                case 
5:
                {
                    
g_iMenuOption[id] = mGroups
                    DisplayMenu
(idg_iMenuPosition[id] = 0)
                }
                case 
6:
                {
                    
ClientCommand_StopMusic(id)
                }
                case 
9:
                {
                    return 
PLUGIN_HANDLED
                
}
                default:
                {
                    
DisplayMenu(id)
                }
            }
        }
    }
    return 
PLUGIN_HANDLED
}

PlayMusic(id, Array:aGroupiRadio)
{
    new 
Radio[Radios]
    
ArrayGetArray(aGroupiRadioRadio)

    if( 
get_pcvar_num(g_pCvarShowAll) )
    {
        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))
        
client_print(0print_chat"%L"LANG_PLAYER"HLMP_LISTENING"szNameRadio[RadioName])
    }

    new 
szMotd[1024], n

    n 
formatex(szMotd[n], charsmax(szMotd)-n"<html><head><meta http-equiv=^"content-type^" content=^"text/htmlcharset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">Now playing: %s <br>", Radio[RadioName])
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<object classid=CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6 codebase=http://www.microsoft.com/ntserver/netshow/download/en/nsmp2inf.cab#Version=5,1,51,415 type=application/x-oleobject name=msplayer width=256 height=65 align=^"middle^" id=msplayer>")
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"enableContextMenu^" value=^"0^"><param name=^"stretchToFit^" value=^"1^">")
    if(
GetIdBits(g_bRepeatid))
    {
        
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"AutoRewind^" value=^"1^">")
    }
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"Volume^" value=^"%d^">"g_iVolume[id])
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"AutoStart^" value=^"1^"><param name=^"URL^" value=^"%s^">"Radio[RadioUrl])
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"uiMode^" value=^"full^"><param name=^"width^" value=^"256^"><param name=^"height^" value=^"65^">")
    
+= formatex(szMotd[n], charsmax(szMotd)-n"<param name=^"TransparentAtStart^" value=^"1^"></object><br>^"%L^"</span>"id"HLMP_CLOSEWINDOW")
    
+= formatex(szMotd[n], charsmax(szMotd)-n"</body></html>")

    
show_motd(idszMotd"HL Media Player")

    
SetIdBits(g_bListeningid)
}

public 
ClientCommand_StopMusic(id)
{
    new 
szMotd[256]
    
formatex(szMotdcharsmax(szMotd), "<html><head><meta http-equiv=^"content-type^" content=^"text/htmlcharset=UTF-8^"></head><body bgcolor=^"#000000^" align=^"center^"><span style=^"color: #FFB000; font-size: 9pt^">^"%L^"</span></body></html>", id, "HLMP_CLOSEWINDOW")
    
show_motd(idszMotd"HL Media Player")
    
ClearIdBits(g_bListeningid)
    return 
PLUGIN_HANDLED
}

public 
OpeningMotdCommands(id)
{
    
ClearIdBits(g_bListeningid)
}  

_________________
http://www.ebateam.eu/


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Zene Lejátszás
HozzászólásElküldve:2012.02.22. 20:54 
Offline
Őstag

Csatlakozott:2011.06.12. 20:51
Hozzászólások:1089
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 44 alkalommal
Köszi!

_________________
[img]semmi[/img]


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése: Rendezés 
Új téma nyitása Hozzászólás a témához  [10 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 11 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole