Help cmd
#3

OMG LOL are you kiddin me?

just copy and paste

PHP код:
#include    <zcmd> 
on top of your gamemode if you dont have it
copy and paste
PHP код:
COMMAND:playtube(playerid,params[])
        return 
ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube by iRaiDeN""Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel"), 1
somewhere in your gamemode
and copy and paste
PHP код:
       if(dialogid == DIALOG_MUSIC)
        {
                if(!
response) return 1;
                if(!
strlen(inputtext)) return ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube by iRaiDeN""Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel");
                if(
strfind(inputtext,"www.*******.com",true) == -1) return ShowPlayerDialog(playerid,DIALOG_MUSIC,DIALOG_STYLE_INPUT,"PlayTube by iRaiDeN""Please input the URL of the song you want (Example: wwww.youtube.com/watch?v=VID Change the VID!)","Play","Cancel");
                new 
localURL[128];
                
strmid(localURL,inputtext,strfind(inputtext"v=")+2,strfind(inputtext"v=")+19);
                new 
localString[128];
                
format(localString128"http://mwrserver.com/*******.php?videoid=%s",localURL);
                for(new 
i!= MAX_PLAYERSi++) PlayAudioStreamForPlayer(i,localString);
        } 
under
PHP код:
OnDialogResponse 
and you are ready

or just add it like filterscript in your server.cfg
Reply


Messages In This Thread
Help cmd - by Shazwan - 18.05.2014, 16:06
AW: Help cmd - by Skimmer - 18.05.2014, 16:09
Re: Help cmd - by rumen98 - 18.05.2014, 16:12
Re: Help cmd - by Shazwan - 18.05.2014, 16:33
Re: Help cmd - by rumen98 - 18.05.2014, 16:37
Re: Help cmd - by Shazwan - 18.05.2014, 16:42
Re: Help cmd - by rumen98 - 18.05.2014, 16:45
Re: Help cmd - by Shazwan - 18.05.2014, 16:46
Re: Help cmd - by Shazwan - 18.05.2014, 16:55
Re: Help cmd - by rumen98 - 18.05.2014, 16:56

Forum Jump:


Users browsing this thread: 1 Guest(s)