Hey Leute, wie mache ich einen Hitsound, keine Idee
Hitsound?
- Tony__Young
- Geschlossen
- Erledigt
Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!
Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
-
-
-
bei der public OnPlayerTakeDamage(playerid, issuerid..
issuerid ist der killer
und playerid erklärt sich von selbst.MFG Piet
-
Wie geht ein "Ton" der ganz kurz ist?
Also kein Stream? -
-
Notfalls einfach den Steam stoppen
http://wiki.sa-mp.com/wiki/StopAudioStreamForPlayer -
Habs so geht aber nicht ?
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(weaponid == 0)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 1)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 2)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 3)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 4)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 5)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 6)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 7)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 8)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 9)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 10)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 11)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 12)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 13)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 14)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 15)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 16)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 17)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 18)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 19)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 20)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 21)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 22)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 23)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 24)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 25)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 26)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 27)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 28)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 29)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 30)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 31)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 32)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 33)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 34)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 35)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 36)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 37)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 38)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 39)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 40)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 41)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
if(weaponid == 42)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
return 1;
} -
Umständlicher geht es wohl nicht?
Wie wäre es mit einigen mathematischen Mini-Operatoren?
if(weaponid >= 0 && weaponid <= 42)
{
...
} -
Danke, habs nun so. Kommt aber kein Hitton?
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(weaponid >= 0 && weaponid <= 42)
{
PlayerPlaySound(playerid, 5201, 0.0, 0.0, 10.0);
}
return 1;
} -
Für wenn soll der Ton denn nun gespielt werden?
Laut Deiner Funktion, für den Schützen.
Ist das nun richtig so oder soll der Geschädigt den Ton hören? -
-
Der Schütze
-
dann mach issuerid
-
breadfish.de
Hat das Thema geschlossen.