Hali.
Lenne egy olyan problémám, hogy a szerver nem mindig adja be az animokat.
Miért?
Például itt van egy ilyen lábon/fejen/gyomron lövéses script:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(AdminSzoliban[damagedid] == 0)
{
if(GetPlayerWeapon(playerid) >= 22 && GetPlayerWeapon(playerid) <= 34)
{
new string[128];
if(sokkolopisztoly[playerid] == 0)
{
if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_HEAD))
{
SetPlayerHealth(damagedid,0);
format(string,sizeof(string),\"* %s golyót kapott a fejébe.\",Nev(damagedid));
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
SetPlayerChatBubble(damagedid,\"* golyót kapott a fejébe *\", LILA, 15.0, 10000);
}else if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_TORSO))
{
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp-50);
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
ApplyAnimation(damagedid,\"SWAT\",\"gnstwall_injurd\",4.1,0,1,1,1,1);
ApplyAnimation(damagedid,\"SWAT\",\"gnstwall_injurd\",4.1,0,1,1,1,1);
format(string,sizeof(string),\"* %s golyót kapott a gyomrába.\",Nev(damagedid));
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
SetPlayerChatBubble(damagedid,\"* golyót kapott a gyomrába *\", LILA, 15.0, 10000);
Serult[damagedid] = true;
}else if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_LEGS))
{
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp-20);
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
ApplyAnimation(damagedid,\"PED\",\"KO_skid_front\",4.1,0,1,1,1,1);
ApplyAnimation(damagedid,\"PED\",\"KO_skid_front\",4.1,0,1,1,1,1);
format(string,sizeof(string),\"* %s golyót kapott a lábába.\",Nev(damagedid));
SetPlayerChatBubble(damagedid,\"* golyót kapott a lábába *\", LILA, 15.0, 10000);
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
Serult[damagedid] = true;
}
}else
{
if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_HEAD))
{
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
format(string,sizeof(string),\"* %s sokkolva lett.\",Nev(damagedid));
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
SetPlayerChatBubble(damagedid,\"* sokkolva lett *\", LILA, 15.0, 10000);
}else if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_TORSO))
{
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
format(string,sizeof(string),\"* %s sokkolva lett.\",Nev(damagedid));
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
SetPlayerChatBubble(damagedid,\"* sokkolva lett *\", LILA, 15.0, 10000);
}else if(IsPlayerAimingTargetBodyPart(playerid, damagedid, BODY_PART_LEGS))
{
TogglePlayerControllable(damagedid,0);
ClearAnimations(damagedid);
new Float:hp;
GetPlayerHealth(damagedid,hp);
SetPlayerHealth(damagedid,hp);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
ApplyAnimation(damagedid, \"CRACK\", \"crckdeth2\", 4.0, 1, 0, 0, 0, 0);
format(string,sizeof(string),\"* %s sokkolva lett.\",Nev(damagedid));
SetPlayerChatBubble(damagedid,\"* sokkolva lett *\", LILA, 15.0, 10000);
ProxDetector(18.0, playerid, string,LILA,LILA,LILA,LILA,LILA);
}
}
}
}
else
{
}
return 1;
}
Ha meglőnek, olyan 10-ből 3-szor adja be az illetőnek az animot. Miért?
A válaszokat előre is köszönöm!