28.08.2013, 11:12
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:
It compiles fine.
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