2021-03-25, 09:12 PM
PHP Code:
public OnPlayerRequestClass(playerid, classid)
{
// your skin code...
if(GetPVarInt(playerid, "playedSong") == 0)
{
SetPVarInt(playerid, "playedSong", 1);
PlayAudioStreamForPlayer(playerid, YOUR_AUDIO_STREAM);
}
}
public OnPlayerSpawn(playerid)
{
// your spawn code...
StopAudioStreamForPlayer(playerid);
SetPVarInt(playerid, "playedSong", 0);
return 1;
}