SA-MP Forums Archive
Music [SOLVED] - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Music [SOLVED] (/showthread.php?tid=90991)



Music [SOLVED] - BP13 - 11.08.2009

you know the music when you join a server? I know how to make it play but how I make it stop playing after you spawn


Re: Music - wilcock33 - 11.08.2009

like this

Код:
public OnPlayerRequestSpawn(playerid)
{
  PlayerPlaySound(playerid,1188 ,0, 0, 0);
	return 1;
}
that stops the music for the pilot award music, replace the 1188 with the stop sound id found on the wiki


Re: Music - dice7 - 11.08.2009

Quote:
Originally Posted by TFZ
like this

Код:
public OnPlayerRequestSpawn(playerid)
{
  PlayerPlaySound(playerid,1188 ,0, 0, 0);
	return 1;
}
that stops the music for the pilot award music, replace the 1188 with the stop sound id found on the wiki
Just use an invalid music id, like 1188 or 1186

edit: actually, this will not work. It will terminate the music immediatlly when you see a class to chose. Add the above code to OnPlayerSpawn


Re: Music - wilcock33 - 11.08.2009

lol i was right for once!


Re: Music - BP13 - 11.08.2009

Quote:
Originally Posted by TFZ
like this

Код:
public OnPlayerRequestSpawn(playerid)
{
  PlayerPlaySound(playerid,1188 ,0, 0, 0);
	return 1;
}
that stops the music for the pilot award music, replace the 1188 with the stop sound id found on the wiki
Theres nothing about this on wiki. And are you sure playing a invalid sound wont make u crash


Re: Music - dice7 - 11.08.2009

yes, since I use the id 1186 to stop the sound


Re: Music - BP13 - 11.08.2009

ok well it works thanks. I had something like this controlling the sound to stop:

pawn Код:
public DynUpdateStart(playerid) //Shurty40
{
    TogglePlayerControllable(playerid, false);
    new string[255];
    format(string, sizeof(string), "~w~Objects~n~~r~Loading");
    GameTextForPlayer(playerid, string, 3000, 6);
    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
    if(GetPlayerPing(playerid) < 100) { SetTimerEx("DynUpdateEnd", 2000, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 100) { SetTimerEx("DynUpdateEnd", 2000, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 200) { SetTimerEx("DynUpdateEnd", 2200, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 300) { SetTimerEx("DynUpdateEnd", 2700, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 500) { SetTimerEx("DynUpdateEnd", 3000, 0,"e",playerid); }
    else { SetTimerEx("DynUpdateEnd", 2700, 0,"e",playerid); }
    return 1;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

public DynUpdateEnd(playerid) //Shurty40
{
    TogglePlayerControllable(playerid, true);
    new string[255];
    format(string, sizeof(string), "~w~Objects~n~~r~Loaded!");
    GameTextForPlayer(playerid, string, 3000, 6);
    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
    return 1;
}
please tell me wtf this is?


Re: Music - wilcock33 - 11.08.2009

that is:






























a load of crap lol

jokes

it looks like a dynamic music player


Re: Music - BP13 - 12.08.2009

and what would that be


Re: Music - ruarai - 12.08.2009

Quote:
Originally Posted by [SU
BP13 ]
ok well it works thanks. I had something like this controlling the sound to stop:

pawn Код:
public DynUpdateStart(playerid) //Shurty40
{
    TogglePlayerControllable(playerid, false);
    new string[255];
    format(string, sizeof(string), "~w~Objects~n~~r~Loading");
    GameTextForPlayer(playerid, string, 3000, 6);
    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
    if(GetPlayerPing(playerid) < 100) { SetTimerEx("DynUpdateEnd", 2000, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 100) { SetTimerEx("DynUpdateEnd", 2000, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 200) { SetTimerEx("DynUpdateEnd", 2200, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 300) { SetTimerEx("DynUpdateEnd", 2700, 0,"e",playerid); }
    else if(GetPlayerPing(playerid) > 500) { SetTimerEx("DynUpdateEnd", 3000, 0,"e",playerid); }
    else { SetTimerEx("DynUpdateEnd", 2700, 0,"e",playerid); }
    return 1;
}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

public DynUpdateEnd(playerid) //Shurty40
{
    TogglePlayerControllable(playerid, true);
    new string[255];
    format(string, sizeof(string), "~w~Objects~n~~r~Loaded!");
    GameTextForPlayer(playerid, string, 3000, 6);
    PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);
    return 1;
}
please tell me wtf this is?
It is something that stops you from falling when you teleport to a map that has a streamer, it also uses GetPlayerPing to set how long to wait.