/globalplay
#1

Alright So i'm still a noob to scripting. I'm trying to make a /globalplay [link] for RCON admins. [Its gonna be in a filterscript] My max Players is 40 if thats needed for any of the looping or whatever. Could anyone help with this code please?
Reply
#2

We dont understand nathing man..Try Explain more better what you want!!
Reply
#3

/globalplay [url]. A command using samps built in PlayAudioStreamForPlayer to play a URL (the admin types after he types the command) and everyone hears it.
Reply
#4

pawn Код:
COMMAND:globalplay(playerid,params[])
{
   if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid,COLOR_RED,"This command is only for admins!");
   else
   {
      new URL[250];
      if(sscanf(params,"s[250]",URL)) return SendClientMessage(playerid,COLOR_RED,"USAGE:/globalplay [URL]");
      for(new i=0;i<=40;i++)
      {
         PlayAudioStreamForPlayer(i,URL);
      }
      SendClientMessage(playerid,COLOR_GREEN,"You have played a song for all players!");
  return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)