[Help] This may sound stupid [Radio] -
[MM]18240[FMB] - 18.07.2012
It is 1:30 AM and I am drawing a blank, how can i have a strcmp command to have it so when someone logged in to RCON types /playforall [URL] it is like PlayAudioStreamForAll [URL] but doesn't have to be programmed in, just pasted after typing /playforall. Like if you type /playforall
http://a.tumblr.com/tumblr_m2lhgaUgsv1qmez87o1.mp3 it will say, "Audio Stream:
http://a.tumblr.com/tumblr_m2lhgaUgsv1qmez87o1.mp3" and play that. Any help, it is late so my describing isn't the best, nor is my grammar....
Re: This may sound stupid -
tyler12 - 18.07.2012
https://sampwiki.blast.hk/wiki/OnRconCommand
Re: This may sound stupid -
[MM]18240[FMB] - 18.07.2012
I desperately hope you don't expect rep for that... Do you? Clearly you didn't read what I was asking, I need it so someone can make an input of a URL and that URL plays for everyone.
Re: This may sound stupid -
[MM]18240[FMB] - 19.07.2012
Anyone? I really need this...
Re: This may sound stupid -
nepstep - 19.07.2012
Tested & working,
nice song by the way
pawn Код:
if(!strcmp(cmdtext, "/playall", true, 8)) //for samps sake why strcmp, use a command processor better :D
{
new url[128];//depending on how long the url size you think will be
format(url, sizeof(url), "%s",cmdtext[9]);
if(!IsPlayerAdmin(playerid)) return 0;
for(new i = 0; i < MAX_PLAYERS; i++) //foreach would be way better
{
PlayAudioStreamForPlayer(i,url);
}
return 1;
}
Re: This may sound stupid -
[KHK]Khalid - 19.07.2012
More info about using
Strcmp for commands with and without
Strtok can be found
here.
Re: This may sound stupid -
Robert West - 19.07.2012
Stop scaming ur post and go sleep
Re: This may sound stupid -
nepstep - 19.07.2012
Quote:
Originally Posted by HellSphinX
More info about using Strcmp for commands with and without Strtok can be found here.
|
Thank you for this sir, I'm not used to script with strcmp commands xD
BTW I edited my first post, tested and working
Re: This may sound stupid -
[MM]18240[FMB] - 20.07.2012
Tested, it won't play anything, it has || . Before anything, like "/playall
http://mp3.wapos.ru/base/5/b/5/4036/wapos114026.mp3" won't play the song "Whistle" but it will say "Audio Stream: ||
http://mp3.wapos.ru/base/5/b/5/4036/wapos114026.mp3" and play nothing...
Also if I am logged in to RCON any command I type says "Audio Stream: "
Re: This may sound stupid -
nepstep - 20.07.2012
Quote:
Originally Posted by [MM]18240[FMB]
|
Weird how i tested it and worked..