25.07.2013, 01:46
Why aren't you using brackets? I'm also pretty sure ZCMD requires the return 1.
With the way you explained it, if I was a complete newbie, my command would look like this:
Oh, btw, I -repped you. You created this thread with the intentions of getting rep, not helping the community out. (You also had no idea what the hell you were talking about)
With the way you explained it, if I was a complete newbie, my command would look like this:
pawn Code:
CMD:playradio(playerid, params[])
PlayAudioStreamForPlayer(playerid,"Here the station");
return 1;
}
pawn Code:
CMD:playradio(playerid, params[])
{
if(isnull(params))
return SendClientMessage(playerid, -1, "Usage: /playradio <url>"),
SendClientMessage(playerid, -1, "Usage: /playradio off to turn it off.");
if(strcmp(params, "off") == 0)
return SendClientMessage(playerid, -1, "You have turned the radio {999999}off{FFFFFF}."),
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, -1, "You have set the {999999}radio station{FFFFFF}.");
PlayAudioStreamForPlayer(playerid, params);
return 1;
}