Hello. Megcsináltam azt a szerveremen ha valakit fejbe lőnek mondja egy hang, hogy HEADSHOT. De ha fejbe lövöm akkor bummm, lefagy a SAMP is és az ellenfél is. Ez mitől lehet????
Itt a kód:
public OnPlayerTakeDamage(playerid, issuerid ,Float: amount, weaponid, bodypart)
{
if( issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
GameTextForPlayer(playerid, \"~r~HEADSHOT!\", 4000, 6);
GameTextForPlayer(issuerid, \"~r~HEADSHOT!\", 4000, 6);
for(new i=0; i < MAX_PLAYERS; i++)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\", X, Y, Z, Distance, 1);
PlayAudioStreamForPlayer(issuerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\", X, Y, Z, Distance, 1);
}
}
}
public OnPlayerTakeDamage(playerid, issuerid ,Float: amount, weaponid, bodypart)
{
if( issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
GameTextForPlayer(playerid, \"~r~HEADSHOT!\", 4000, 6);
GameTextForPlayer(issuerid, \"~r~HEADSHOT!\", 4000, 6);
for(new i=0; i < MAX_PLAYERS; i++)
{
new Float:X, Float:Y, Float:Z, Float:Distance = 5.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\", X, Y, Z, Distance, 1);
PlayAudioStreamForPlayer(issuerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\", X, Y, Z, Distance, 1);
}
}
}
->
public OnPlayerTakeDamage(playerid, issuerid ,Float: amount, weaponid, bodypart)
{
if( issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
GameTextForPlayer(playerid, \"~r~HEADSHOT!\", 4000, 6);
GameTextForPlayer(issuerid, \"~r~HEADSHOT!\", 4000, 6);
PlayAudioStreamForPlayer(playerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\");
PlayAudioStreamForPlayer(issuerid, \"file:///C:/Users/Admin/Desktop/samp/filterscripts/headshot.mp3\");
}
}
[mod]Bedobtam a kódok közé. Gondolom elnézted, ha mégsem legközelebb, majd tedd te is így. Köszönöm.[/mod]