SA-MP Forums Archive
/globalplay - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /globalplay (/showthread.php?tid=331545)



/globalplay - lsfmd - 05.04.2012

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?


Re: /globalplay - Arnold_Collins - 05.04.2012

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


Re: /globalplay - lsfmd - 05.04.2012

/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.


Re: /globalplay - Cjgogo - 05.04.2012

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;
}