28.07.2007, 11:54
@ Azteca. I am not going to add that into the script as not everybody wants it but i will show you how to do it and you can edit it.
The music is simple, in my code under OnPlayerEnterVehicle just use
Make sure you put that AFTER the player's position has been set so it plays the sound for the player at the new position and around that area.
pawn Код:
public OnVehicleDeath(vehicleid, killerid)
{
if (GetVehicleModel(vehicleid) == 519)
{
new inside;
for (new a = 0; a < MAX_PLAYERS; a++)
{
if (IsPlayerConnected(a) && InShamal[a] > 0)
{
inside ++;
}
}
if (inside)
{
CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
}
}
return 1;
}
pawn Код:
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X,Y,Z);
PlayerPlaySound(playerid, soundid, X,Y,Z);