CMD:musicall(playerid,params[]) { new link[128]; if(sscanf(params, "s[128]", link)) return SendClientMessage(playerid, -1, "Use: /musicall [Link]"); for(new i; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, link); } return 1; }
CMD:musicall(playerid,params[]) { new link[128]; if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only RCON admins can use this command."); if(sscanf(params, "s[128]", link)) return SendClientMessage(playerid, -1, "Use: /musicall [Link]"); for(new i; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, link); } return 1; }
Thanks I'll test it.
Btw is it with ******* or I need to find a site with .mp3 urls? |
CMD:musicall(playerid,params[]) { if(IsPlayerAdmin(playerid)) { new link[128]; if(sscanf(params, "s[128]", link)) return SendClientMessage(playerid, -1, "Use: /musicall [Link]"); for(new i; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, link); } } else return 0; return 1; }
CMD:musicall(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return 0; new link[128]; if(sscanf(params, "s[128]", link)) return SendClientMessage(playerid, -1, "Use: /musicall [Link]"); for(new i; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, link); } return 1; }
Less code! (usefoul)
Код:
CMD:musicall(playerid,params[]) { if(!IsPlayerAdmin(playerid)) return 0; new link[128]; if(sscanf(params, "s[128]", link)) return SendClientMessage(playerid, -1, "Use: /musicall [Link]"); for(new i; i < MAX_PLAYERS; i++) { PlayAudioStreamForPlayer(i, link); } return 1; } |
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "Only RCON admins can use this command.");
if(!IsPlayerAdmin(playerid)) return 0;