14.05.2015, 16:06
Is the player supposed to enter a url? If so, then sscanf should have given a warning for not specifying a length using "s" specifier but it's also wrong because input is integer and not a string as it should have.
sscanf is not needed though:
if "jingle" is a global string and you need to copy the url a player input to it, uncomment the line. Also "newsjingle" is not used for anything in the command.
sscanf is not needed though:
PHP код:
CMD:setjingle(playerid, params[])
{
if(!IsRadioMember(playerid)) return SCM(playerid, COLOR_GREY, "You are not a member of RSF.");
if(isnull(params)) return SendUsageMessage(playerid, "/setjingle [jingle stream url] - Abusing will get you punished!");
//strcat((jingle[0] = EOS, jingle), params, sizeof (jingle));
PlayAudioStreamForPlayer(playerid, params);
SendClientMessage(playerid, COLOR_UPDATED, "The jingle URL has successfully been updated!");
return 1;
}