help with saving health /spec
#1

Well i made saving health and setting health back to normal when we /spec but problem is how to stop anti spawn kill protection interfere with saving health for example if an admin uses /spec while his ASP is on then it will save asp health and give him infinite health later on,how can i stop this from happening?
Reply
#2

show us your code gor the asp and spec
Reply
#3

Its a simple saving system

GetPlayerHealth(playerid, OldHealth[playerid]);
SetPlayerHealth(playerid,OldHealth[playerid]);

and asp

Код:
forward ASPUpdate();
public ASPUpdate()
{
	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		if(IsPlayerConnected(i) && PInfo[i][ASP] == 1)
		{
			SetPlayerHealth(i,100000);
		}
	}
}
Reply
#4

pawn Код:
if(PInfo[i][ASP] == 1) OldHealth[playerid] = 100.0;
else GetPlayerHealth(playerid, OldHealth[playerid]);
Reply
#5

Thank you so much

can you help me with this too?

https://sampforum.blast.hk/showthread.php?tid=564977
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)