Game mode restart and with music? Please Help!
#1

Alright, to start off, I have searched, and I know this is a stupid question...........
How do I make it so my server/ game mode restarts every 15 minutes?
And music id 1183 plays, and I want the music to stop when it returns to player class selection?
To stop the music is music id 1184. Thanks!
Reply
#2

pawn Code:
forward Restart();

public OnGameModeInIt()
{
SetTimer("Restart",900000,false);
return 1;
}

public Restart()
{
GameModeExit();
}
This will restart the server every 15 minutes
Reply
#3

Here is your music code


Put that after OnPlayerConnect
Code:
PlayerPlaySound(playerid,1183,418.1829,2533.8340,16.5637);//to play the sound
And that after OnPlayerSpawn
Code:
PlayerPlaySound(playerid,1183,418.1829,2533.8340,16.5637);//to stop the sound
Have fun ! ^^
Reply
#4

Sound:

pawn Code:
OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid, 1184, 0, 0, 0) //Sound will be played when player spawned
}

OnPlayerDeath(playerid, killerid, reason)
{
PlayerPlaySound(playerid, 1183, 0, 0, 0) //Stop sound when player is death. But, it will be played again when the player re-spawn
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)