SA-MP Forums Archive
ЎЎBug Personaje no muere no Agonisa en Role play!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: ЎЎBug Personaje no muere no Agonisa en Role play!! (/showthread.php?tid=573046)



ЎЎBug Personaje no muere no Agonisa en Role play!! - cristoperxtr - 04.05.2015

Lo que esta pasando es que cuando muero o alguien muere cerca a la puerta de LSPD no hace la animacion de Crack osea no se pone a agonisar si no aparece en otro lugar cerca a donde murio o al lado del Hospital.
Lo mismo ocurre Cerca a la puerta del Hospital de los Santos.

Y Cuando me alejo un poco Digamos la Distancia de la puerta de LSPD Seria la distancia masomenos el largo de 5 o 6 autos si agonisa al morir y asi si puede poner aceptar muerte o pedir un medico.
Tambien puede agonisar normal cuando esta mas lejos san fieero tambien.
Solo sucede en la Puerta de LSPD y SAMD

el problema es ese que cuando me acerco ala puerta de LSPD o la puerta de SAMD muere pero aparece denuevo cerca con vida y puedes caminar.

Grasias por la respuesta y pueden decirme que lineas mostrar para ver que esta mal.

Grasias.


EDITANDO : Estoy colocando los codigos:

Код:
//xtr
timer EMSUpdate[3000](){
	foreach(Player, i){
	    if(GetPVarType(i, "Injured")){
	        if(GetPVarInt(i, "EMSAttempt") != 0){
				new Float:health;
 				GetPlayerHealth(i,health);
				if(GetPVarInt(i, "EMSAttempt") == -1)
				{
    				if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~y~Estas herido~n~~w~/aceptar muerte o /servicio medico", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 1)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 8)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 2)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			GameTextForPlayer(i, "~g~Rescatado~n~~w~En espera de atencion medica...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 3){
	    			if(IsPlayerInAnyVehicle(i)){
	        			new ambmodel = GetPlayerVehicleID(i);
	        			if(GetVehicleModel(ambmodel) == 416){
	    					GameTextForPlayer(i, "~g~Rescatado~n~~w~Espera que SAMD te lleve al hospital...", 5000, 3);
						}
						else{
	        				SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        				KillEMSQueue(i);
	        				SetPVarInt(i, "Hospital", 1);
							SpawnPlayer(i);
						}
					}
					else{
		    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        			KillEMSQueue(i);
	        			SetPVarInt(i, "Hospital", 1);
						SpawnPlayer(i);
					}
				}
				if(health <= 10)
				{
	    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te transladу inmediatamente al hospital.");
	    			KillEMSQueue(i);
	    			SetPVarInt(i, "Hospital", 1);
        	    	SetHP(i, 50);
					SpawnPlayer(i);
				}
	        }
	    }
	}
}
Tambien dejo los codigos de aceptar muerte:

Код:
CMD:aceptar(playerid, params[])
	{
	    new sendername[MAX_PLAYER_NAME];
		new giveplayer[MAX_PLAYER_NAME];
		new string[128];
	    if(IsPlayerConnected(playerid))
		{
	        if(isnull(params))
			{
	            SendClientMessageEx(playerid, COLOR_WHITE, "USA: /aceptar [nombre]");
	            SendClientMessageEx(playerid, COLOR_GREY, "Nombres: bebida - telefono - multa - Piezas - matrimonio - arma - coche - fichasg");
	            SendClientMessageEx(playerid, COLOR_GREY, "Nombres: taxi - mecanico - FZ - muerte - banda - fix - recarga - vip - fichasvip");
	            return 1;
	        }
	        if(strcmp(params,"muerte",true) == 0)
			{
	   	    	if(GetPVarInt(playerid, "Injured") == 1)
				{
                	KillEMSQueue(playerid);
                	if(!IsACop(playerid)) ResetPlayerWeaponsEx(playerid);
                	SetPVarInt(playerid, "Hospital", 1);
                	SendClientMessageEx(playerid, COLOR_WHITE, "{FFFB00}Fuistes trasladado al hospital y los mйdicos pudierуn reanimarte.");
                	SendClientMessageEx(playerid, COLOR_WHITE, "{FFFB00}Estбn curandote las heridas, aguarda un momento.");
                	SpawnPlayer(playerid);
            	}
            	else SendClientMessageEx(playerid, COLOR_GREY, "   No estбs apunto de morir, no puedes hacer esto ahora!");
        	}
Tambien los codigos de servicio medico:

Код:
CMD:servicio(playerid, params[])
{
	new string[128], choice[32];
	if(sscanf(params, "s[32]", choice))
	{
		SendClientMessageEx(playerid, COLOR_WHITE, "USA: /servicio [Nombre]");
		SendClientMessageEx(playerid, COLOR_GREY, "Nombres Disponibles: Taxi, Mecanico, Medico [Llamar a un mйdico], Medicos");
		return 1;
	}
	if(Info[playerid][pJailed] > 0)
	{
		SendClientMessageEx(playerid, COLOR_WHITE, "No puedes usar esto en prisiуn.");
		return 1;
	}
	if(Info[playerid][pServiceTime] > 0) return SendClientMessageEx(playerid, COLOR_WHITE, "Necesitas esperar 30 segundos para usar este comando. " );

	if(strcmp(choice,"medico",true) == 0)
	{
		if(GetPVarInt(playerid, "Injured") == 0)
		{
			SendClientMessageEx(playerid, COLOR_GREY, "   No estбs herido, no puedes llamar a mйdicos ahora!");
			return 1;
		}
		new zone[MAX_ZONE_NAME];
		GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
		SetPVarInt(playerid, "EMSAttempt", 1);
		SendClientMessageEx(playerid, COLOR_WHITE, "La SAMD ha sido informado de su ubicaciуn actual y estбn en camino.");
		format(string, sizeof(string), "* Central: Reportan a un tal (%d) %s que puede estar herido en %s, se requiere emegercia inmediata.",playerid, GetPlayerNameEx(playerid), zone);
		SendRadioMessage(4, TEAM_MED_COLOR, string);
		Info[playerid][pServiceTime] = 30;
		return 1;
	}
Game base zc

Grasias por la respuesta:

ї En que Carrera tecnica se enseсa los codigos pawno ? aparte de los tutoriales que hay en internet.


Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - Toolkit - 04.05.2015

Es broma este post?

Danos mбs informaciуn, pъblica parte del cуdigo en donde se ejecutan las funciones al morir..


Respuesta: Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - cristoperxtr - 05.05.2015

Quote:
Originally Posted by Toolkit
Посмотреть сообщение
Es broma este post?

Danos mбs informaciуn, pъblica parte del cуdigo en donde se ejecutan las funciones al morir..
Aqui estan los codigos Grasias por la ayuda amigo.

Код:
//xtr
timer EMSUpdate[3000](){
	foreach(Player, i){
	    if(GetPVarType(i, "Injured")){
	        if(GetPVarInt(i, "EMSAttempt") != 0){
				new Float:health;
 				GetPlayerHealth(i,health);
				if(GetPVarInt(i, "EMSAttempt") == -1)
				{
    				if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~y~Estas herido~n~~w~/aceptar muerte o /servicio medico", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 1)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 8)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 2)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			GameTextForPlayer(i, "~g~Rescatado~n~~w~En espera de atencion medica...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 3){
	    			if(IsPlayerInAnyVehicle(i)){
	        			new ambmodel = GetPlayerVehicleID(i);
	        			if(GetVehicleModel(ambmodel) == 416){
	    					GameTextForPlayer(i, "~g~Rescatado~n~~w~Espera que SAMD te lleve al hospital...", 5000, 3);
						}
						else{
	        				SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        				KillEMSQueue(i);
	        				SetPVarInt(i, "Hospital", 1);
							SpawnPlayer(i);
						}
					}
					else{
		    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        			KillEMSQueue(i);
	        			SetPVarInt(i, "Hospital", 1);
						SpawnPlayer(i);
					}
				}
				if(health <= 10)
				{
	    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te transladу inmediatamente al hospital.");
	    			KillEMSQueue(i);
	    			SetPVarInt(i, "Hospital", 1);
        	    	SetHP(i, 50);
					SpawnPlayer(i);
				}
	        }
	    }
	}
}
Grasias estare aki conectado esperando tu respuesta grasias.


Respuesta: ЎЎBug Personaje no muere no Agonisa en Role play!! - Juance - 05.05.2015

Aplica dos veces la animaciуn.


Respuesta: ЎЎBug Personaje no muere no Agonisa en Role play!! - cristoperxtr - 05.05.2015

Quote:
Originally Posted by Juance
Посмотреть сообщение
Aplica dos veces la animaciуn.
Donde dime cual parte Repito y donde porfavor, como quedaria los codigos un ejemplo. Grasias.


Respuesta: ЎЎBug Personaje no muere no Agonisa en Role play!! - Juance - 05.05.2015

Donde aplicas la animaciуn, copia ese cуdigo y pegalo abajo.
Код:
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);



Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - lComandante - 05.05.2015

No creo que sea un bug, lo que se me ocurre es que cuando un usuario es matado en la puerta de LSPD o sus alrededores, no valdrнa la muerte ya que serнa un total PG y no rol de entorno (debido a que estбs por los lados de la estaciуn de policias).


Respuesta: Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - cristoperxtr - 06.05.2015

Quote:
Originally Posted by lComandante
Посмотреть сообщение
No creo que sea un bug, lo que se me ocurre es que cuando un usuario es matado en la puerta de LSPD o sus alrededores, no valdrнa la muerte ya que serнa un total PG y no rol de entorno (debido a que estбs por los lados de la estaciуn de policias).
Entonces si es PG y no rol de Entorno Donde estan esos codigos para poder quitarle

Grasias por la Respuesta


Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - Toolkit - 06.05.2015

Quote:
Originally Posted by lComandante
Посмотреть сообщение
No creo que sea un bug, lo que se me ocurre es que cuando un usuario es matado en la puerta de LSPD o sus alrededores, no valdrнa la muerte ya que serнa un total PG y no rol de entorno (debido a que estбs por los lados de la estaciуn de policias).
Estбs diciendo cualquier estupides, el problema esta en la funciуn de muerte, esta bug seguro y no guarda bien la posiciуn y buguea al personaje desincronizandolo con el servidor.


Respuesta: Re: ЎЎBug Personaje no muere no Agonisa en Role play!! - cristoperxtr - 06.05.2015

Quote:
Originally Posted by Toolkit
Посмотреть сообщение
Estбs diciendo cualquier estupides, el problema esta en la funciуn de muerte, esta bug seguro y no guarda bien la posiciуn y buguea al personaje desincronizandolo con el servidor.
Si parece que no guarda bien tambien la posicion aveces cuando entro aparece en el cielo o muere aveces pasa.

ya aplique dos veces la animacion asi:

Код:
//xtr
timer EMSUpdate[3000](){
	foreach(Player, i){
	    if(GetPVarType(i, "Injured")){
	        if(GetPVarInt(i, "EMSAttempt") != 0){
				new Float:health;
 				GetPlayerHealth(i,health);
				if(GetPVarInt(i, "EMSAttempt") == -1)
				{
    				if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~y~Estas herido~n~~w~/aceptar muerte o /servicio medico", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 1)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 8)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			SetHP(i, health-5);
	    			ApplyAnimation(i, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0, 1);
					GameTextForPlayer(i, "~r~Herido~n~~w~Espera que SAMD llegue...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 2)
				{
	    			if(!IsPlayerInRangeOfPoint(i, 3.0, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ")))
	    			{
					    Streamer_UpdateEx(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerPos(i, GetPVarFloat(i,"MedicX"), GetPVarFloat(i,"MedicY"), GetPVarFloat(i,"MedicZ"));
						SetPlayerVirtualWorld(i, GetPVarInt(i,"MedicVW"));
				  		SetPlayerInterior(i, GetPVarInt(i,"MedicInt"));
	    			}
	    			GameTextForPlayer(i, "~g~Rescatado~n~~w~En espera de atencion medica...", 5000, 3);
				}
				if(GetPVarInt(i, "EMSAttempt") == 3){
	    			if(IsPlayerInAnyVehicle(i)){
	        			new ambmodel = GetPlayerVehicleID(i);
	        			if(GetVehicleModel(ambmodel) == 416){
	    					GameTextForPlayer(i, "~g~Rescatado~n~~w~Espera que SAMD te lleve al hospital...", 5000, 3);
						}
						else{
	        				SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        				KillEMSQueue(i);
	        				SetPVarInt(i, "Hospital", 1);
							SpawnPlayer(i);
						}
					}
					else{
		    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te translado inmediatamente al hospital.");
	        			KillEMSQueue(i);
	        			SetPVarInt(i, "Hospital", 1);
						SpawnPlayer(i);
					}
				}
				if(health <= 10)
				{
	    			SendClientMessageEx(i, COLOR_WHITE, "Perdiste el conocimiento y se te transladу inmediatamente al hospital.");
	    			KillEMSQueue(i);
	    			SetPVarInt(i, "Hospital", 1);
        	    	SetHP(i, 50);
					SpawnPlayer(i);
				}
	        }
	    }
	}
}
y sigue pasando lo mismo

Grasias por tu respuesta.