HELP ME
#1

Good, I would like to a collaboration in an error that I have in my server. Use the gamemode South Central and it has an error at the time that one falls wounded teleports him to another place not to the death
Reply
#2

Have you tried adding the 'teleporting' part of the script so that it's only called under onplayerdeath?
Reply
#3

Really not is much of programming, by that Samsung here
Reply
#4

I'm sorry I don't understand. Could you possibly show the code that teleports the player when the get hurt and how it is called?
Reply
#5

What happens is that when a player falls wounded, not the place where it fell wounded is going to another place. There is where is the error must be in the place where it fell wounded.
Reply
#6

You just need to add two lines which set the player's position and the angle when player spawns in injured state as the position and angle of the player gets saved when the player dies.
Like this:
Код:
SetPlayerPos(playerid, PlayerData[playerid][pPos][0], PlayerData[playerid][pPos][1], PlayerData[playerid][pPos][2]);
SetPlayerFacingAngle(playerid, PlayerData[playerid][pPos][3]);
So you add them here under OnPlayerSpawn to this part:
Код:
		if (PlayerData[playerid][pInjured])
		{
			SetPlayerPos(playerid, PlayerData[playerid][pPos][0], PlayerData[playerid][pPos][1], PlayerData[playerid][pPos][2]);
			SetPlayerFacingAngle(playerid, PlayerData[playerid][pPos][3]);
			
		        ShowHungerTextdraw(playerid, 0);

			TextDrawShowForPlayer(playerid, gServerTextdraws[2]);
			SendClientMessage(playerid, COLOR_LIGHTRED, "[WARNING]:{FFFFFF} You are injured and require medical attention (/call 911).");

			ApplyAnimation(playerid, "CRACK", "null", 4.0, 0, 0, 0, 1, 0, 1);
			ApplyAnimation(playerid, "CRACK", "crckdeth4", 4.0, 0, 0, 0, 1, 0, 1);
		}
Reply
#7

Sorry, but I returned to an old position of 3 or 5 seconds when one falls wounded.
It works sometimes
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)