OnPlayerConnect Stram - 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: OnPlayerConnect Stram (
/showthread.php?tid=445204)
OnPlayerConnect Stream -
gurmani11 - 20.06.2013
.....................
Re: OnPlayerConnect Stram -
gurmani11 - 20.06.2013
Really no help :O?
Re: OnPlayerConnect Stram -
Mike_Peterson - 20.06.2013
Quite easy actually, however there's a couple of things.
Do you want music to play once someone connects, stops when someone spawns, but starts again if someone types /trance or /hardstyle etc..?
pawn Код:
new bool:Manual[MAX_PLAYERS];
Add a simple variable to the music commands then, like Manual[playerid] = true;
and at OnPlayerSpawn add
pawn Код:
if(Manual[playerid] == false) {
StopAudioStreamForPlayer(playerid);
}
don't forget to set the value to false at OnPlayerDisconnect and OnPlayerConnect,
Kind regards,
Mike Peterson
Re: OnPlayerConnect Stream -
gurmani11 - 20.06.2013
.....................
Re: OnPlayerConnect Stram -
Mike_Peterson - 20.06.2013
Show me your OnPlayerSpawn callback along with /hardstyle please.
Re: OnPlayerConnect Stram -
gurmani11 - 20.06.2013
.....................