my lil death script.
#1

ok heres the deal, i have this code. what its suppose to do is when you die, it will set the playerposition back to were he died and freeze the player and set an animation. Now i tried fondoling with this code for days now but now im just stuck, what happens is that the player is successfully teleported to the possision and frozen, but heres the wierd thing. on his screen he is doing the animation, but on every1 else's it just looks like hes standing. and the animation is preloaded... any ideas..?
Код:
if(MedicBill[playerid] >= 1 && PlayerInfo[playerid][pJailed] == 0 && PlayerPaintballing[playerid] == 0)//dead
		{
			new cut = PlayerInfo[playerid][pLevel]*deathcost;
			if(!IsPlayerInAnyVehicle(playerid) || IsABoat(carid) || IsAPlane(carid))
			{ SetPlayerPos(playerid,dX,dY,dZ); }
			else { SetPlayerPos(playerid,dX,dY+1.5,dZ); }
			ApplyAnimation(playerid,"CRACK","crckdeth2",4.0, 1, 1, 1, 1, 1); 	   
			SetPlayerInterior(playerid,0);
			SetPlayerVirtualWorld(playerid,0);
			GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~r~You are serverely wounded...", 35000, 3);
			PlayerInfo[playerid][pDeaths] += 1;
			PlayerDead[playerid] =1;
			PlayerDead2[playerid] =1;
			SetPlayerHealth(playerid, 1.0); 
			GivePlayerMoney(playerid, -cut);
			ResetPlayerWeapons(playerid);
			SendClientMessage(playerid,COLOR_ORANGE, "A Medic has been called. You will be helped soon.");
			new turner[MAX_PLAYER_NAME];
			new wanted[MAX_STRING];
			new wanted2[MAX_STRING];
			new string[MAX_STRING];
			GetPlayerName(playerid, turner, sizeof(turner));
			format(wanted, sizeof(wanted), "Dispatch: All Units IA: Caller: %s",turner);
			SendRadioMessage(4, TEAM_CYAN_COLOR, wanted);
			SendJobMessage(26, TEAM_CYAN_COLOR, wanted);
			format(wanted2, sizeof(wanted2), "Dispatch: Incident: Severe Injury");
			SendRadioMessage(4, TEAM_CYAN_COLOR, wanted2);
			SendJobMessage(26, TEAM_CYAN_COLOR, wanted2);
			format(string, sizeof(string), "** %s is in need of a Medic. (use /accept medic to accept the call)", turner);
			SendRadioMessage(4, TEAM_AZTECAS_COLOR, string);
			SendJobMessage(26, TEAM_CYAN_COLOR, string);
			MedicCall = playerid;
			MedicTime[playerid] = 3;
			NeedMedicTime[playerid] = 110;
			TogglePlayerControllable(playerid,0);
		  return 1;
		}
Reply


Messages In This Thread
my lil death script. - by serj009 - 26.07.2009, 18:02
Re: my lil death script. - by member - 26.07.2009, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)