autocrack when player have 20 hp
#1

I want that when a player is in a car and have 20 hp , he will be ejected from his car (RemovePlayerFromVehicle(i); and have the crack animation. My problem is that when he is ejected from car, he stays stand up and the crack animation dont work :/ Any help pls . Here is the code



Код:
	    	new Float:health;
				GetPlayerHealth(i, health);
				if (health <= 20 && dying[i] == 0)
				{
				  if(!(IsPlayerInAnyVehicle(i)))
					{
					 format(string, sizeof(string), "* %s falls on the floor", GetPlayerNameEx(i));
				     ProxDetector(15.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
					 SendClientMessage(i, COLOR_WHITE, "  You are dying now , you can wait for medic or you can use '/accept death' ");
					printf("%s", string);
			  		TogglePlayerControllable(i, 0);
			  		ApplyAnimation(i,"CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
			  		gPlayerUsingLoopingAnim[i] = 1;
					dying[i] = 1;
					}
					else
					{
					  TogglePlayerControllable(i, 0);
                      ApplyAnimation(i,"CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
					  format(string, sizeof(string), "* %s loses consciousness", GetPlayerNameEx(i));
					   ProxDetector(15.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                       SendClientMessage(i, COLOR_WHITE, "  You are dying now , you can wait for medic or you can use '/accept death' ");
                       RemovePlayerFromVehicle(i);
						printf("%s", string);
						dying[i] = 1;
	   
					}
				}
Reply


Messages In This Thread
autocrack when player have 20 hp - by Malkinu - 05.04.2010, 17:21
Re: autocrack when player have 20 hp - by pmk1 - 05.04.2010, 17:45
Re: autocrack when player have 20 hp - by Jay420 - 05.04.2010, 19:03

Forum Jump:


Users browsing this thread: 1 Guest(s)