0 Members and 3 Guests are viewing this topic.
varMaxHP: byte; // do medkitprocedure Reset;begin if Command('/realistic') = 1 then MaxHP:=65 else MaxHP:=150;end;if regExpMatch('^/(buy-2|buy2|buy 2|buy med|buy medkit|buy apteczka)$',lowercase(Text)) then begin if Player[ID].Pkasa >= med then begin Player[ID].Pkasa := Player[ID].Pkasa - med; DoDamage(ID, GetPlayerStat(ID, 'Health')-MaxHP);end else WriteConsole(ID, 'You do not have enough money',red);end;
Speak Polish or English...not Polenglish...cause I can barely understand you.
To heal just make negative value in DoDamage. And I don't see a point here "GetPlayerStat(ID, 'Health')-MaxHP" - IIRC you can't give some one more HP than maximum value...
Quote from: Wookash on March 19, 2011, 09:43:22 amTo heal just make negative value in DoDamage. And I don't see a point here "GetPlayerStat(ID, 'Health')-MaxHP" - IIRC you can't give some one more HP than maximum value...Damaging the player by the value of "GetPlayerStat(ID, 'Health')-MaxHP" will heal him to the amount MaxHP is set. Also you can heal up to 200HP with scripts.Quote from: Wookash on March 15, 2011, 11:20:43 amSpeak Polish or English...not Polenglish...cause I can barely understand you.Tell that his translator tool >_>
Let's say MaxHP is 200 and the player has 50 health left -> 50 - 200 = -150There you go with the negative damage
procedure Reset;begin if Command('/realistic') = 1 then MaxHP:=65 else MaxHP:=150;end;
that regex isn't even inside an event |:
Quote from: dnmr on March 19, 2011, 11:19:44 amthat regex isn't even inside an event |:Because he just copied a few parts from his script dnmr (Atleast i think so xD)
Quote from: Swompie on March 19, 2011, 11:21:22 amQuote from: dnmr on March 19, 2011, 11:19:44 amthat regex isn't even inside an event |:Because he just copied a few parts from his script dnmr (Atleast i think so xD)seems like he copied a few parts from somebody else's script...
Quote from: dnmr on March 19, 2011, 11:45:42 amQuote from: Swompie on March 19, 2011, 11:21:22 amQuote from: dnmr on March 19, 2011, 11:19:44 amthat regex isn't even inside an event |:Because he just copied a few parts from his script dnmr (Atleast i think so xD)seems like he copied a few parts from somebody else's script...Yeah, more likely. He tries to combine 2 scripts together...