Help me with cmd please
#2

Usage: /streamtoall link SONGNAME SONGARTIST.

PHP код:
CMD:streamtoall(playeridparams[])
{
    new 
song[128], songname[128], songartist[128];
    new 
string[128];
    if(
sscanf(params"sss"songsongnamesongartist)) return SendClientMessage(playeridCOLOR_GRAD1"USAGE: /streamtoall [Web link to an audio file. (mp3skull.com)] [Song Name (Underscore for space)] [Song Artist (Underscore for space)]");
    for(new 
0strlen(songname); i++)
    {
        if(
songname[i] == '_')
        {
            
songname[i] = ' ';
        }
    }
    for(new 
0strlen(songartist); i++)
    {
        if(
songartist[i] == '_')
        {
            
songartist[i] = ' ';
        }
    }
    for(new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
                
format(stringsizeof(string), "Song playing: %s by %s."songnamesongartist);
                
SendClientMessage(iCOLOR_ORANGEstring);
                
PlayAudioStreamForPlayer(isong);
        }
    }
    return 
1;

To stop the music:

PHP код:
CMD:stopplay(playeridparams[])
{
    
StopAudioStreamForPlayer(playerid);
    
SendClientMessage(playeridCOLOR_ORANGE"Audio stopped!");
    return 
1;

Reply


Messages In This Thread
Help me with cmd please - by PrinceOfPersia - 28.11.2013, 22:02
Re: Help me with cmd please - by ikbenremco - 29.11.2013, 05:51

Forum Jump:


Users browsing this thread: 2 Guest(s)