Audio stream for all players on command
#10

You should use ZCMD outside of any callback. Also it should be only one command processor, only ZCMD. Do not use OnPlayerCommandText (strcmp) + ZCMD.

An example:
pawn Код:
#include <a_samp>
#include <foreach>
#include <sscanf2>
#include <zcmd>

main() {}

public OnGameModeInit()
{
    return 1;
}

// some other callbacks

CMD:stream(playerid,params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new url[200];
        if(sscanf(params,"s[200]", url)) return SendClientMessage(playerid, 0x9C9C9CAA,"Syntax: /stream [url]");
        foreach(new i: Player)
        {
            PlayAudioStreamForPlayer(i, url);
        }
    }
    return 1;
}

// maybe some functions
It compiles fine.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)