Music [SOLVED]
#1

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
Reply
#2

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
Reply
#3

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
Reply
#4

lol i was right for once!
Reply
#5

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
Reply
#6

yes, since I use the id 1186 to stop the sound
Reply
#7

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?
Reply
#8

that is:






























a load of crap lol

jokes

it looks like a dynamic music player
Reply
#9

and what would that be
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)