A problem
#1

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
Reply
#2

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

Yes and when i try without.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)