AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   who can make this? (https://forums.alliedmods.net/showthread.php?t=137506)

d_duck 09-06-2010 07:09

who can make this?
 
this is Event Script code.

i want to trans this to SM

Code:

    es_usermsg create music VGUIMenu
    es_usermsg write string music info
    es_usermsg write byte music 0
    es_usermsg write byte music 3
    es_usermsg write string music title
    es_usermsg write string music "Any"
    es_usermsg write string music type
    es_usermsg write string music 2
    es_usermsg write string music msg
    es_usermsg write string music http://www.google.com

This code is not show motd panel but just link to player.
ex) if the site address is '~~/~~.mp3', It can be a music player.

I don't want to show the motd panel.

d_duck 09-06-2010 20:29

Re: who can make this?
 
Quote:

Originally Posted by Dcem (Post 1293122)


nope,
I don't want to use VGUIPanel.
just link to music.
Like a streaming

asherkin 09-07-2010 12:27

Re: who can make this?
 
This should be the exact copy of what you pasted.

PHP Code:

new Handle:music StartMessageAll("VGUIMenu");
BfWriteString(music"info");
BfWriteByte(music0);
BfWriteByte(music3);
BfWriteString(music"title");
BfWriteString(music"\"Any\"");
BfWriteString(music"type");
BfWriteString(music"2");
BfWriteString(music"msg");
BfWriteString(music"http://www.google.com");
EndMessage(); 

It's hard to know without more code.

p3tsin 09-07-2010 18:41

Re: who can make this?
 
Just for comparison, here's the same thing with ShowVGUIPanel as suggested.

PHP Code:

new Handle:kv CreateKeyValues("data");
KvSetString(kv"title""\"Any\"");
KvSetString(kv"type""2");
KvSetString(kv"msg""http://www.google.com");
ShowVGUIPanel(client"info"kvfalse);
CloseHandle(kv); 


d_duck 09-08-2010 08:36

Re: who can make this?
 
Quote:

Originally Posted by p3tsin (Post 1294387)
Just for comparison, here's the same thing with ShowVGUIPanel as suggested.

PHP Code:

new Handle:kv CreateKeyValues("data");
KvSetString(kv"title""\"Any\"");
KvSetString(kv"type""2");
KvSetString(kv"msg""http://www.google.com");
ShowVGUIPanel(client"info"kvfalse);
CloseHandle(kv); 



yeah, thx for reply, it dosen't show .
but
my music url put into msg, but didn't work.
didn't play music.

d_duck 09-08-2010 08:38

Re: who can make this?
 
Quote:

Originally Posted by asherkin (Post 1294081)
This should be the exact copy of what you pasted.

PHP Code:

new Handle:music StartMessageAll("VGUIMenu");
BfWriteString(music"info");
BfWriteByte(music0);
BfWriteByte(music3);
BfWriteString(music"title");
BfWriteString(music"\"Any\"");
BfWriteString(music"type");
BfWriteString(music"2");
BfWriteString(music"msg");
BfWriteString(music"http://www.google.com");
EndMessage(); 

It's hard to know without more code.

how to give to a player that I want to give.

asherkin 09-08-2010 08:41

Re: who can make this?
 
Quote:

Originally Posted by d_duck (Post 1294707)
how to give to a player that I want to give.

Change
PHP Code:

StartMessageAll("VGUIMenu"

to
PHP Code:

StartMessageOne("VGUIMenu"client

If you need more than one client: http://docs.sourcemod.net/api/index....d=show&id=125&

d_duck 09-08-2010 08:56

Re: who can make this?
 
Quote:

Originally Posted by asherkin (Post 1294709)
Change
PHP Code:

StartMessageAll("VGUIMenu"

to
PHP Code:

StartMessageOne("VGUIMenu"client

If you need more than one client: http://docs.sourcemod.net/api/index....d=show&id=125&

thank you but,
it did not played.
my link is not invaild. correct.
what's the problem?

Death [GER] 09-08-2010 09:59

Re: who can make this?
 
Noone can know the reason if you do not post errors that occur..

p3tsin 09-08-2010 12:44

Re: who can make this?
 
Quote:

Originally Posted by d_duck (Post 1294718)
thank you but,
it did not played.
my link is not invaild. correct.
what's the problem?

Does it work with your ES code? Because asherkin's code really is the exact same thing. Also, do the links point directly to .mp3 files or maybe to a media player? I'd suggest using an IE compatible player if you already aren't.


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

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