example: PlayerPlaySound (1130, 0,0,0);
|
Set the music +1, so it would be i have this PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
And set under OnPlayerSPawn or make a /stopmusic command @ Clum# You cant set music to play at a certain position, only on players |
if(strcmp(cmdtext, "/stopmusic", true, 10) == 0)
{
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
return 1;
}
public OnPlayerConnect(playerid)
{
PlayerPlaySound(playerid, 1186, 0.0, 0.0, 5.0);
//Rest of code here//
return 1;
}
if (strcmp(cmdtext, "/plant", true) == 0)
{
if(IsPlanted[id] == 0)
{
if(GetPlayerTeam(playerid) == TEAM_RED)
{
if(IsPlayerInRangeOfPoint(playerid, 7.0, -1304.4406,2546.2034,90.3281))
{
IsPlanted[id] = 1;
BombTimer = SetTimer("Bomb",30000,false);
SendClientMessageToAll(COLOR_BLUE, ".: The Bomb has been planted :.");
PlayerPlaySound(playerid ,1183,0,0,0); //****HERE****//
BombC = CreateDynamicCP(-1304.4406,2546.2034,90.3281, 1.5, -1, -1, -1, 100.0);
return 1;
}
else return SendClientMessage(playerid, COLOR_ERROR, ".: [ERROR]: You must in CT Generator Room :.");
}
else return SendClientMessage(playerid, COLOR_ERROR, ".: [ERROR]: Only Terrorist can use this command :.");
}
else return SendClientMessage(playerid, COLOR_ERROR, ".: [ERROR]: Bomb has been planted :.");
}
return 0;
}