←  Problemy z pluginami

AMXX.pl: Support AMX Mod X i SourceMod

»

[ROZWIĄZANE] LoadingSongAdvanced_3.amxx

Zablokowany

  • +
  • -
Supryk - zdjęcie Supryk 26.08.2012

Witam mam problem z tym pluginem

Wgrywam wszystko dobrze

W pliku loadingsongs.ini wpisuje
zone.mp3

i ta nute mam 2 cstrike/sound/misc

nuta nawet się nie sciaga może ktos przetestować ??



#include <amxmodx>
#include <amxmisc>

#define MAX_SONGS 10

public plugin_init() {
register_plugin("loading with music","1.0","eFrigid")
return PLUGIN_CONTINUE
}

new configsdir[200]
new configfile[200]
new song[MAX_SONGS][64]
new songdir[MAX_SONGS][64]
new bool:precached[MAX_SONGS]


public plugin_precache()
{
get_configsdir(configsdir,199)
format(configfile,199,"%s/loadingsongs.ini",configsdir)
new trash
for(new i=0;i<MAX_SONGS;i++)
{
precached[i]=false
read_file(configfile,i,song[i],63,trash)
if(!equali(song[i][4],""))
{
precached[i]=true
format(songdir[i],63,"sound/misc/%s",song[i])
precache_sound(songdir[i])
}
}
}

public client_connect(id) {

for(new i=0;i<MAX_SONGS;i++)
client_cmd(id,"play sound/misc/%s",songdir[i])
return PLUGIN_HANDLED
}


Z góry dzięki

Załączone pliki


Użytkownik Supryk edytował ten post 26.08.2012 16:23
Odpowiedz

GT Team - zdjęcie GT Team 26.08.2012

źle odtwarzasz dźwięk, zamień z
client_cmd(id, "play sound/misc/%s", songdir[i])
, na
client_cmd(id, "play sound/misc/%s", song[i])
P.S : Nie pobiera bo źle również formatujesz ścieżkę docelową :precache_sound dodaje już sound, zamień precache_sound na precache_generic:)
Użytkownik PaTrIcKx edytował ten post 26.08.2012 16:48
Odpowiedz

  • +
  • -
Supryk - zdjęcie Supryk 26.08.2012


#include <amxmodx>
#include <amxmisc>

#define MAX_SONGS 10

public plugin_init() {
register_plugin("loading with music","1.0","eFrigid")
return PLUGIN_CONTINUE
}

new configsdir[200]
new configfile[200]
new song[MAX_SONGS][64]
new songdir[MAX_SONGS][64]
new bool:precached[MAX_SONGS]


public plugin_precache()
{
get_configsdir(configsdir,199)
format(configfile,199,"%s/loadingsongs.ini",configsdir)
new trash
for(new i=0;i<MAX_SONGS;i++)
{
precached[i]=false
read_file(configfile,i,song[i],63,trash)
if(!equali(song[i][4],""))
{
precached[i]=true
format(songdir[i],63,"sound/misc/%s",song[i])
precache_generic(songdir[i])
}
}
}

public client_connect(id) {

for(new i=0;i<MAX_SONGS;i++)
client_cmd(id,"play sound/misc/%s", song[i])
return PLUGIN_HANDLED
}

i nadal nic :(
Plugin mam z http://forums.allied...ead.php?t=21345
Użytkownik Supryk edytował ten post 26.08.2012 18:24
Odpowiedz

GT Team - zdjęcie GT Team 26.08.2012

Ostatnie linie
masz
Client_cmd(id, "Play ...


Zamień na

Client_cmd(id, "mp3 Play ...
Odpowiedz

  • +
  • -
Supryk - zdjęcie Supryk 26.08.2012

DOBRA


/*Loading Song Advanced: Supports,
*|  \/  | _ \__ /
*| |\/| |  _/|_ \ Files
*|_|  |_|_| |___/
*v2.0:
*the random play issue.
*
*-------------------------------------------------------------------------------------
*
*v1.1:
*Found a little bug in 1.0.
*-------------------------------------------------------------------------------------
*Credit:
*[OSA]Odin For his original version
*twistedeuphoria For helping fix the random play issue.
*
*Difference from [OSA]Odin's
*Instead of having to edit a code everytime you want to add a song this version includes an ini file(loadingsongs.ini) to add your mp3's. You can add up to 50 mp3's of your choice
*[NOTE]Adding 4 full mp3's is a very long download![/NOTE]
*
*mp3's
*If your wondering where to put these. They go in your sound/misc Folder
*
*loadingsongs.ini
*Add your mp3's name
*ie:
*
*eazye.mp3
*
*If the mp3 you put in your misc folder was named "eazye.mp3"
*
*Soon to come:
*
*Making it support wav
*
*
*Installation:
*
*Place sma file in "Scripting" folder.(compile if needed)
*
*Place amxx file in "Plugins" folder(If you compiled yourself get amxx file out of "Compiled" folder located in the scripting folder.
*
*Go in "Configs" folder add the loadingsounds.ini file.
*
*Add your mp3's name in "loadingsongs.ini" file
*
*Last but not least edit your "plugins.ini" file located in your "Configs" folder add loadingsongadvanced.amxx in your third party custom plugins.
*/
#include <amxmodx>
#include <amxmisc>

#define MAX_SONGS 50

public plugin_init() {
register_plugin("loading with music","2.0","eFrigid")
return PLUGIN_CONTINUE
}

new configsdir[200]
new configfile[200]
new song[MAX_SONGS][64]
new songdir[MAX_SONGS][64]
new bool:precached[MAX_SONGS]

public plugin_precache()
{
get_configsdir(configsdir,199)
format(configfile,199,"%s/loadingsongs.ini",configsdir)
new trash
for(new i=0;i<MAX_SONGS;i++)
{
precached[i]=false
read_file(configfile,i,song[i],63,trash)
if(!equali(song[i][4],""))
{
precached[i]=true
format(songdir[i],63,"misc/%s",song[i])
precache_sound(songdir[i])
}
}
}

public client_connect(id) {
new size = file_size(configfile,1)
new rsong = random_num(1,size)
new cursong[64], a
read_file(configfile,rsong,cursong,63,a)
client_cmd(id,"mp3 play sound/misc/%s",cursong)

return PLUGIN_CONTINUE
}

client_cmd(id,"mp3 play sound/misc/%s",cursong)

Wpisując recznie zamiast %s nazwę pliku w moim przypadku zone jest ok wiec co zrobić ??
Użytkownik Supryk edytował ten post 26.08.2012 19:02
Odpowiedz

GT Team - zdjęcie GT Team 26.08.2012

Łap sma

#include
#include

#define MAX_SONGS 20
new gDir[MAX_SONGS][32];
new file[] = "addons/amxmodx/configs/loadmusic.ini";
public plugin_init()
{
register_plugin("Loading Music","0.1","tomcionek15 & grs4");
}
new num;

public plugin_precache()
{
new len, arg[32], szDir[64];
for(new i; read_file(file, i, arg, charsmax(arg),len);i++)
{

remove_quotes(arg);
copy(gDir[i], charsmax(arg), arg);
formatex(szDir, charsmax(szDir), "sound/misc/%s", gDir[i]);
num++
precache_generic(szDir);
}
}
public client_connect(id)
{
new rand = random(num);
client_cmd(id, "mp3 play sound/misc/%s", gDir[rand]);
}



twórz plik W :addons/amxmodx/configs/ nazwa : loadmusic.ini

piszesz np w nim

"test.mp3"
i Pliki dajesz do sound/misc/

i działa :)
Odpowiedz

  • +
  • -
Supryk - zdjęcie Supryk 27.08.2012


Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

loadingsongadvanced_3.sma(6) : error 017: undefined symbol "register_plugin"
loadingsongadvanced_3.sma(13) : error 017: undefined symbol "read_file"
loadingsongadvanced_3.sma(16) : error 017: undefined symbol "remove_quotes"
loadingsongadvanced_3.sma(17) : error 017: undefined symbol "copy"
loadingsongadvanced_3.sma(18) : error 017: undefined symbol "formatex"
loadingsongadvanced_3.sma(20) : error 017: undefined symbol "precache_generic"
loadingsongadvanced_3.sma(22) : warning 203: symbol is never used: "len"
loadingsongadvanced_3.sma(25) : error 017: undefined symbol "random"
loadingsongadvanced_3.sma(26) : error 017: undefined symbol "client_cmd"

8 Errors.
Could not locate output file loadingsongadvanced_3.amxx (compile failed).

Posypalo troszke
Odpowiedz

  • +
  • -
glut - zdjęcie glut 27.08.2012

proszę

#include <amxmodx>
#include <amxmisc>

#define MAX_SONGS 20
new gDir[MAX_SONGS][32];
new file[] = "addons/amxmodx/configs/loadmusic.ini";
public plugin_init()
{
register_plugin("Loading Music","0.1","tomcionek15 & grs4");
}
new num;

public plugin_precache()
{
new len, arg[32], szDir[64];
for(new i; read_file(file, i, arg, charsmax(arg),len);i++)
{

remove_quotes(arg);
copy(gDir[i], charsmax(arg), arg);
formatex(szDir, charsmax(szDir), "sound/misc/%s", gDir[i]);
num++
precache_generic(szDir);
}
}
public client_connect(id)
{
new rand = random(num);
client_cmd(id, "mp3 play sound/misc/%s", gDir[rand]);
}
Odpowiedz

GT Team - zdjęcie GT Team 27.08.2012

No wlasnie ostatnio zjada mi inludy na forum. dzięki glut
Odpowiedz

  • +
  • -
Supryk - zdjęcie Supryk 27.08.2012

wielkie dzięki za pomoc

można zamknąć
Odpowiedz

Gość_21977_* 03.09.2012

Wiadomość wygenerowana automatycznie


Ten temat został zamknięty przez moderatora.

Powód: Pomoc udzielona

Jeśli się z tym nie zgadzasz, Dołączona grafika raportuj ten post, a moderator lub administrator rozpatrzy go ponownie.


Z pozdrowieniami,
Zespół AMXX.PL
Odpowiedz

Gość_21977_* 03.09.2012

Automatyczna wiadomość


Ten temat został przeniesiony z forum

Scripting AMXXProblemy

do

AMX Mod XProblemy z pluginami
Odpowiedz
Zablokowany