Dialog Inputtext
#10

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
PHP код:
if(dialogid == DIALOG_STREAMBOX)
    {
        new 
string[MAX_PLAYERS];
        if(
response)
        {
            for(new 
0MAX_PLAYERSi++)
               {
                   
format(string,sizeof(string),"%s",str_replace("%""#",inputtext));
                       
StopAudioStreamForPlayer(i);
                      
PlayAudioStreamForPlayer(istring);
                      
format(stringsizeof(string), "[DEEJAY] %s have play a song from | Url: %s"IsPlayerName(playerid), inputtext);
                    
SendClientMessage(i0x00FFCCAAstring);
                      
SendClientMessage(i, -1"================================");
                     
SendClientMessage(i, -1"================================");
                      
SendClientMessage(i0x00FF99AA"Use /stopmusic if you want to stop the song from playing");
                }
              }
        }
        return 
1;
    } 
and for the str_replace function use this one !
https://github.com/GRGServer/SAMP/bl...tr_replace.inc
Tested it, still crash my server when I type % into the dialog
Reply


Messages In This Thread
Dialog Inputtext - by AfiqIqbal - 07.10.2017, 06:58
Re: Dialog Inputtext - by Steve57 - 07.10.2017, 07:43
Re: Dialog Inputtext - by Kane - 07.10.2017, 07:47
Re: Dialog Inputtext - by Kraeror - 07.10.2017, 08:31
Re: Dialog Inputtext - by AfiqIqbal - 07.10.2017, 08:36
Re: Dialog Inputtext - by AfiqIqbal - 07.10.2017, 08:42
Re: Dialog Inputtext - by Kane - 07.10.2017, 08:50
Re: Dialog Inputtext - by FuNkYTheGreat - 07.10.2017, 09:00
Re: Dialog Inputtext - by OsmanMalagic - 07.10.2017, 09:10
Re: Dialog Inputtext - by AfiqIqbal - 07.10.2017, 11:57

Forum Jump:


Users browsing this thread: 1 Guest(s)