30.10.2015, 16:04
Still not working I will show you the code all of my ApplyAnimation when died of my gamemode.
PHP код:
//1
if(GetPVarInt(i, "EMSAttempt") == -1)
{
if(GetPlayerAnimationIndex(i) != 746) ClearAnimations(i), ApplyAnimation(i, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
if(!GetPVarType(i, "StreamPrep") && !IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i, "OnStretcher"))
{
SendClientMessageEx(i, COLOR_WHITE, "Ban da bi bat tinh, ban se duoc dua ve benh vien de dieu tri.");
KillEMSQueue(i);
SpawnPlayer(i);
}
GameTextForPlayer(i, "~r~Bi thuong~n~~w~/chapnhan chet hoac /dichvu capcuu", 5000, 3);
}
//2
if(GetPVarInt(i, "EMSAttempt") == 1)
{
if(GetPlayerAnimationIndex(i) != 746) ClearAnimations(i), ApplyAnimation(i, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
if(!GetPVarType(i, "StreamPrep") && !IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")) && !GetPVarInt(i, "OnStretcher"))
{
SendClientMessageEx(i, COLOR_WHITE, "You fell unconscious, you were immediately sent to the hospital.");
KillEMSQueue(i);
SpawnPlayer(i);
}
GameTextForPlayer(i, "~r~Injured~n~~w~Waiting for EMS to Arrive...", 5000, 3);
}
//3
if(GetPlayerInterior(playerid) > 0) Player_StreamPrep(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"), FREEZE_TIME);
GameTextForPlayer(playerid, "~r~Bi thuong~n~~w~/chapnhan chet hoac /dichvu capcuu", 5000, 3);
ClearAnimations(playerid);
ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
SetPlayerHealth(playerid, 100);
RemoveArmor(playerid);
if(GetPVarInt(playerid, "usingfirstaid") == 1)
{
firstaidexpire(playerid);
}
//4
if(GetPVarType(iPlayer, "MedicCall")) {
ClearAnimations(iPlayer);
ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
}
DeletePVar(iPlayer, "StreamPrep");
//5
if(GetPVarType(playerid, "Injured"))
{
SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
ClearAnimations(playerid);
ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
}