Roleplay Death not working
#1

Alright it supposed to be when you died , GameModeText will show to you "Injured""/service ems" but it's not showing , you will automatically teleport to any hospital like in Original San Andreas what part of Script can i see it??

Here are the codes that has "/service ems" text
Код:
forward SendEMSQueue(playerid,type);
public SendEMSQueue(playerid,type)
{
	switch (type)
	{
		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"), 4000);
			GameTextForPlayer(playerid, "~r~Injured~n~~w~ /service ems", 5000, 3);
			ClearAnimations(playerid);
			ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid,0);
			if(GetPVarInt(playerid, "usingfirstaid") == 1)
			{
			    firstaidexpire(playerid);
			}
			SetPVarInt(playerid,"MedicCall",1);
		}
		case 2:
		{
		    SetPVarInt(playerid,"EMSAttempt", 2);
			ClearAnimations(playerid);
		 	ApplyAnimation(playerid, "SWAT", "gnstwall_injurd", 4.0, 0, 1, 1, 1, 0, 1);
			SetPlayerHealth(playerid, 100);
			SetPlayerArmour(playerid,0);
		}
	}
	return 1;
}
Код:
ptask EMSUpdate[5000](playerid)
{
    if(GetPVarType(playerid, "Injured"))
    {
        if(GetPVarInt(playerid, "EMSAttempt") != 0)
		{

			new Float:health;
			GetPlayerHealth(playerid,health);
			SetPlayerHealth(playerid, health-1);
			if(GetPVarInt(playerid, "EMSAttempt") == -1)
			{
				if(GetPlayerAnimationIndex(playerid) != 746) ClearAnimations(playerid), ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
				GameTextForPlayer(playerid, "~r~Injured~n~~w~/service ems", 5000, 3);
			}
			if(GetPVarInt(playerid, "EMSAttempt") == 1)
			{
				if(GetPlayerAnimationIndex(playerid) != 746) ClearAnimations(playerid), ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.0, 0, 1, 1, 1, 0, 1);
				GameTextForPlayer(playerid, "~r~Injured~n~~w~Waiting for EMS to Arrive...", 5000, 3);
			}
			if(GetPVarInt(playerid, "EMSAttempt") == 2)
			{
    			GameTextForPlayer(playerid, "~g~Rescued~n~~w~Awaiting Treatment...", 5000, 3);
			}
			if(GetPVarInt(playerid, "EMSAttempt") == 3)
			{
    			if(IsPlayerInAnyVehicle(playerid))
    			{
        			new ambmodel = GetPlayerVehicleID(playerid);
        			if(IsAnAmbulance(ambmodel) || IsATierraESCar(ambmodel))
        			{
    					GameTextForPlayer(playerid, "~g~Rescued~n~~w~Waiting for EMS to take to Hospital...", 5000, 3);
					}
					else
					{
	    				SendClientMessageEx(playerid, COLOR_WHITE, "You fell unconscious due to no life support, you were immediately sent to the hospital.");
        				KillEMSQueue(playerid);
						SpawnPlayer(playerid);
						TogglePlayerBurning(playerid, false);
					}
				}
				else
				{
	    			SendClientMessageEx(playerid, COLOR_WHITE, "You fell out of the vehicle, the Paramedics will have to try harder.");
				}
			}

			GetPlayerHealth(playerid, health);
			if(health <= 5)
			{
    			SendClientMessageEx(playerid, COLOR_WHITE, "You fell unconscious, you were immediately sent to the hospital.");
    			KillEMSQueue(playerid);
				SpawnPlayer(playerid);
				TogglePlayerBurning(playerid, false);
			}
        }
    }
}
Reply
#2

Someone knows how to fix this?
Reply
#3

Please heLP!
Reply
#4

BUMP
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)