PDA

View Full Version : /globalplay


lsfmd
05/04/2012, 05:57 AM
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?

Arnold_Collins
05/04/2012, 06:00 AM
We dont understand nathing man..Try Explain more better what you want!!

lsfmd
05/04/2012, 06:09 AM
/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.

Cjgogo
05/04/2012, 08:43 AM
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;
}