SA-MP Forums Archive
please help guys - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: please help guys (/showthread.php?tid=367814)



please help guys - rumen98 - 11.08.2012

PHP код:
CMD:radio(playeridparams[])
{
    new 
radio;
     if (
sscanf(params"s"radio )) SendClientMessage(playeridCOLOR_RED"Usage: \"/radio <Link>");
    
SendClientMessage(playeridCOLOR_RED"TIP: 127.0.0.1:8000 ");
    else
    {
        
PlayAudioStreamForPlayer(playerid"http://"radio"/listen.pls");
    }
    return 
1;

This is errors


PHP код:
C:\Documents and Settings\user\Desktop\radio.pwn(10) : error 029invalid expressionassumed zero
C
:\Documents and Settings\user\Desktop\radio.pwn(12) : error 001expected token"-string end-"but found "-identifier-"
C:\Documents and Settings\user\Desktop\radio.pwn(12) : warning 215expression has no effect
C
:\Documents and Settings\user\Desktop\radio.pwn(12) : error 001expected token";"but found "-string-"
C:\Documents and Settings\user\Desktop\radio.pwn(12) : warning 215expression has no effect
C
:\Documents and Settings\user\Desktop\radio.pwn(12) : error 001expected token";"but found ")"
C:\Documents and Settings\user\Desktop\radio.pwn(12) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
5 Errors

im try to make command for random radio starting who can help me


Re: please help guys - RedJohn - 11.08.2012

pawn Код:
if (sscanf(params, "s", radio )) return SendClientMessage(playerid, COLOR_RED, "Usage: \"/radio <Link>");



Re: please help guys - Cjgogo - 11.08.2012

pawn Код:
CMD:radio(playerid, params[])
{
    new radio[256];
    if (sscanf(params, "s[256]", radio )) SendClientMessage(playerid, COLOR_RED, "Usage:/radio <Link>");
    SendClientMessage(playerid, COLOR_RED, "TIP: 127.0.0.1:8000 ");
    else
    {
        PlayAudioStreamForPlayer(playerid, "http://radio/listen.pls");

    }
    return 1;
}



Re: please help guys - rumen98 - 11.08.2012

Quote:
Originally Posted by RedJohn
Посмотреть сообщение
pawn Код:
if (sscanf(params, "s", radio )) return SendClientMessage(playerid, COLOR_RED, "Usage: \"/radio <Link>");
now i have error
PHP код:
C:\Documents and Settings\user\Desktop\radio.pwn(13) : error 035argument type mismatch (argument 2
Anyting here
PHP код:
        PlayAudioStreamForPlayer(playerid,radio); 



Re: please help guys - IceMeteor - 11.08.2012

pawn Код:
CMD:radio(playerid, params[])
{
    new radio[128];
    if (sscanf(params, "s[128]", radio ))
    {
        SendClientMessage(playerid, COLOR_RED, "Usage: /radio <Link>");
        SendClientMessage(playerid, COLOR_RED, "TIP: http://127.0.0.1:8000/listen.pls");
        return 1;
    }
    PlayAudioStreamForPlayer(playerid, radio);
    return 1;
}



Re: please help guys - rumen98 - 11.08.2012

Quote:
Originally Posted by Cjgogo
Посмотреть сообщение
pawn Код:
CMD:radio(playerid, params[])
{
    new radio[256];
    if (sscanf(params, "s[256]", radio )) SendClientMessage(playerid, COLOR_RED, "Usage:/radio <Link>");
    SendClientMessage(playerid, COLOR_RED, "TIP: 127.0.0.1:8000 ");
    else
    {
        PlayAudioStreamForPlayer(playerid, "http://radio/listen.pls");

    }
    return 1;
}
Hey man do not work why ? see the picture
then i press command
/sradio 127.0.0.1:8000
show me
Usage:/radio <IP> | 127.0.0.1:8000
the TIP why do not audio stream ?


Re: please help guys - kickerbat - 11.08.2012

Try:

Код:
new Text:radio[256];



Re: please help guys - rumen98 - 11.08.2012

Quote:
Originally Posted by IceMeteor
Посмотреть сообщение
pawn Код:
CMD:radio(playerid, params[])
{
    new radio[128];
    if (sscanf(params, "s[128]", radio ))
    {
        SendClientMessage(playerid, COLOR_RED, "Usage: /radio <Link>");
        SendClientMessage(playerid, COLOR_RED, "TIP: http://127.0.0.1:8000/listen.pls");
        return 1;
    }
    PlayAudioStreamForPlayer(playerid, radio);
    return 1;
}
Again do not work why ?
see picture