SA-MP Forums Archive
[FilterScript] Simple Owner/Admin entrance music. - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple Owner/Admin entrance music. (/showthread.php?tid=370947)



Simple Owner/Admin entrance music. - Reix[EST] - 21.08.2012

If Owner/Admin/Player (however you like to use it) connect to server then everyone will hear MP3 song of your choose.


1. Put this script into your gamemode/filterscript under "OnPlayerConnect".
2. For search MP3 songs go to www.beemp3.com (example).
3. Compile your gamemode/filterscript.
4. Enjoy!



If this isnt work problem can be:
1. Wrong/broken mp3 link.
2. Not correct admin level check line.
3. You must define your admin system in top of your filterscript/gamemode.



In top of your script define your admin system.
Код:
#include <Define here your admin system>
Код:
public OnPlayerConnect(playerid)
{
    if (APlayerData[playerid][PlayerLevel] >= 5) //You must modify this line,change it to make it work with your admin system.
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                StopAudioStreamForPlayer(i);
                PlayAudioStreamForPlayer(i, "Put here MP3 url link" ); 
            }
        }
    }

	return 1;
}



Re: Simple Owner/Admin entrance music. - im - 21.08.2012

This is NOT a filterscript. Just some code..


Respuesta: Simple Owner/Admin entrance music. - Onfroi - 21.08.2012

It would be cool a sound that says "Welcome Admin!" like with robot voice or something, you just gave the code...nothing special.


Respuesta: Simple Owner/Admin entrance music. - Vegas. - 21.08.2012

This is unuseless for me.. But nice work.


Re: Simple Owner/Admin entrance music. - XStormiest - 21.08.2012

pawn Код:
public OnPlayerConnect(playerid)
{
    if (APlayerData[playerid][PlayerLevel] >= 5) //You must modify this line,change it to make it work with your admin system.
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                StopAudioStreamForPlayer(i);
                PlayAudioStreamForPlayer(i, "Put here MP3 url link" );
            }
        }
    }
   
    return 1;
}
serious? 0/10.....
this will stop the music...and after start it...
and this is just a snippet...not an entire filterscirpt
sorry man but all can do this and more easy
suggestion:
use foreach( loop more faster)


Re: Simple Owner/Admin entrance music. - Kaperstone - 21.08.2012

Quote:
Originally Posted by im
Посмотреть сообщение
This is NOT a filterscript. Just some code..
theres a name for this.
https://sampforum.blast.hk/showthread.php?tid=281


Re: Simple Owner/Admin entrance music. - Mark Shade - 22.08.2012

Doesn't really work.


Re: Simple Owner/Admin entrance music. - Sgt.TheDarkness - 22.08.2012

Quote:
Originally Posted by xkirill
Посмотреть сообщение
Quote:
Originally Posted by Mark Shade
Посмотреть сообщение
Doesn't really work.
I think you should have read the topic more carefully, then you would have found this link https://sampforum.blast.hk/showthread.php?tid=281


Re: Simple Owner/Admin entrance music. - Reix[EST] - 22.08.2012

Quote:
Originally Posted by im
Посмотреть сообщение
This is NOT a filterscript. Just some code..
What is your problem?,this script is what topic title saying.
This will be useful for many many owners.


Re: Simple Owner/Admin entrance music. - Reix[EST] - 22.08.2012

Quote:
Originally Posted by XStormiest
Посмотреть сообщение
serious? 0/10.....
this will stop the music...and after start it...
and this is just a snippet...not an entire filterscirpt
sorry man but all can do this and more easy
suggestion:
use foreach( loop more faster)
Im sorry that i posted it as filterscript,so get over it.
Only wanted share something useful and well working,that all.