help with saving health /spec - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help with saving health /spec (
/showthread.php?tid=565397)
help with saving health /spec -
Nabster - 27.02.2015
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?
Re: help with saving health /spec -
JaydenJason - 27.02.2015
show us your code gor the asp and spec
Re: help with saving health /spec -
Nabster - 27.02.2015
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);
}
}
}
Re: help with saving health /spec -
Threshold - 27.02.2015
pawn Код:
if(PInfo[i][ASP] == 1) OldHealth[playerid] = 100.0;
else GetPlayerHealth(playerid, OldHealth[playerid]);
Re: help with saving health /spec -
Nabster - 27.02.2015
Thank you so much
can you help me with this too?
https://sampforum.blast.hk/showthread.php?tid=564977