SA-MP Forums Archive
A problem - 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: A problem (/showthread.php?tid=331690)



A problem - lsfmd - 05.04.2012

pawn Код:
COMMAND:gplay(playerid,params[]){
    if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command is only for admins!");
    new URL[250];
    if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/globalplay [URL]");
    for(new i=0;i<MAX_PLAYERS;i++)
    {
        if(IsPlayerConnected(i)) continue;
        PlayAudioStreamForPlayer(i,URL);
    }
    SendClientMessage(playerid,COLOR_RED,"You have played a song for all players!");
    return 1;
}
The problem here is that when i try to use the command it keeps returning USAGE:/globalplay [URL] when i enter a link. Could anyone see a problem with/ fix this code? Thanks in advanced

-lsfmd


Re: A problem - blank. - 05.04.2012

And when you enter it without a parameter?
EDIT:
Try placing curly brackets ({}) before and after the Usage SCM return.


Re: A problem - lsfmd - 05.04.2012

Yes and when i try without.