case 1: { Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ")); SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ")); SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW")); SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt")); SetPVarInt(playerid, "EMSAttempt", -1); 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, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1); SetPlayerHealth(playerid, 100); RemoveArmor(playerid); if(GetPVarInt(playerid, "usingfirstaid") == 1) { firstaidexpire(playerid); } SetPVarInt(playerid,"MedicCall",1); new string[128]; dielabel[playerid] = Create3DTextLabel(" ",0xFF0000FF,30.0,40.0,50.0,15.0,0); format(string,sizeof(string),"(( Nguoi nay dang bi thuong ))"); Update3DTextLabelText(dielabel[playerid], 0xFF0000FF, string); Attach3DTextLabelToPlayer(dielabel[playerid], playerid, 0.0, 0.0, 0.4); SendClientMessageEx(playerid, COLOR_TWBLUE, "Su dung lenh [/chapnhan chet] neu ban da het co hoi song sot."); //TogglePlayerControllable(playerid,0); }
ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1); |
case 1:
{
Streamer_UpdateEx(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerPos(playerid, GetPVarFloat(playerid,"MedicX"), GetPVarFloat(playerid,"MedicY"), GetPVarFloat(playerid,"MedicZ"));
SetPlayerVirtualWorld(playerid, GetPVarInt(playerid,"MedicVW"));
SetPlayerInterior(playerid, GetPVarInt(playerid,"MedicInt"));
SetPVarInt(playerid, "EMSAttempt", -1);
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);
ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
SetPlayerHealth(playerid, 100);
RemoveArmor(playerid);
if(GetPVarInt(playerid, "usingfirstaid") == 1)
{
firstaidexpire(playerid);
}
SetPVarInt(playerid,"MedicCall",1);
new string[128];
dielabel[playerid] = Create3DTextLabel(" ",0xFF0000FF,30.0,40.0,50.0,15.0,0);
format(string,sizeof(string),"(( Nguoi nay dang bi thuong ))");
Update3DTextLabelText(dielabel[playerid], 0xFF0000FF, string);
Attach3DTextLabelToPlayer(dielabel[playerid], playerid, 0.0, 0.0, 0.4);
SendClientMessageEx(playerid, COLOR_TWBLUE, "Su dung lenh [/chapnhan chet] neu ban da het co hoi song sot.");
//TogglePlayerControllable(playerid,0);
}
//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);
}
ClearAnimations(playerid);