Class Selection Music
#1

Hi guys i want a class selection music i got this

public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return 1;

PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/9/26/3351322/Hiphop%20Instrumentals%20-%20rap%20freestyle%20beats.mp3");

new string[128];
new pname[24];
Reply
#2

pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/9/26/3351322/Hiphop%20Instrumentals%20-%20rap%20freestyle%20beats.mp3");//play it
    return 1;
}
public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);//stop it
    return 1;
}
i hope that helps
Reply
#3

I gona test if it works you got ++rep
Reply
#4

make sure that your Radio Volume is full
Reply
#5

Sow this needs under player spawn
{
StopAudioStreamForPlayer(playerid);//stop it
return 1;
}
Reply
#6

only
pawn Код:
StopAudioStreamForPlayer(playerid);
so no errors or warnings come
Reply
#7

Pawno dont works if i press run
Reply
#8

Lol Post your codes and where did u put your codes
Reply
#9

this will 100% Work
pawn Код:
public OnPlayerSpawn(playerid)
{
    StopAudioStreamForPlayer(playerid);
    return 1;
}
Reply
#10

public OnPlayerRequestClass(playerid, classid)
{
PlayAudioStreamForPlayer(playerid, "http://www.fileden.com/files/2012/9/26/3351322/Hiphop%20Instrumentals%20-%20rap%20freestyle%20beats.mp3");//play it
return 1;
}
{
if(IsPlayerNPC(playerid)) return 1;

//Set up the class selection
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1753.6743,885.2703,295.8750);
SetPlayerCameraPos(playerid,-1753.6849,892.0016,295.8750);
SetPlayerCameraLookAt(playerid,-1753.6743,885.2703,295.8750);
SetPlayerFacingAngle(playerid,0.6323);

//Do things to the player
SetPlayerColor(playerid,COLOR_DEADCONNECT);
SetPlayerTeamFromClass(playerid,classid);


public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);//stop it
return 1;
}
{
if(IsPlayerNPC(playerid))
{
if(strcmp(PlayerName(playerid), "Billy") == 0)
{
PutPlayerInVehicle(playerid,NPCTram,0);
SetPlayerColor(playerid,COLOR_DARKOLIVEGREEN);
SetPlayerSkin(playerid,255);
IsSpawned[playerid] =1;
print("[NPC SPAWN] Billy has been placed in his tram.");
}
return 1;
}
new string[128];
new pname[128];
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)