Issues with HP and actors - 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: Issues with HP and actors (
/showthread.php?tid=585337)
Issues with HP and actors -
mirou123 - 12.08.2015
Hello everyone. Unlike what the title suggests, I have two separate problems. One with HP and the other with actors. I couldn't find any better title so sorry about that.
First problem:
Sometimes when I take damage (fell, got shot...) or even if I try to set my HP (Up or down) my health bar will get updated for a second then go back to the initial amount. So my health would actually go down for a second then go back up. Or when I want to heal myself my health would go up for a little bit then go back down. I have no code in OnPlayerTakeDamage nor OnPlayerGiveDamage and this is my /sethp command (or part of it at least) in case it is needed:
Код:
YCMD:sethp(playerid, params[], help)
{
new player, HP;
if(sscanf(params, "ud", player, HP)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sethp [playerid] [HP]");
if(!IsPlayerConnected(player)) return SendError(playerid, "Invalid player ID!");
SetPlayerHealth(player, HP);
return 1;
}
Second problem:
It's more like a question. If I spawn an actor on custom mapping, he is gonna fall through. How can I prevent that?
PS: I am using a streamer.
Thank you for helping.
Re: Issues with HP and actors -
zDivine - 13.08.2015
First problem: Do you have any anti-cheats that detect players' health? Might want to check for that.
Second problem: I have never tested that, but I scripted a filterscript (
Actor Studio ), where you can create Actors' in game, dynamically. You can use that to test your question.
Re: Issues with HP and actors -
mirou123 - 13.08.2015
Thanks for your help and no I don't have any anti-cheats or anything that messes with the health of players for now. And I'll further investigate the second problem. Maybe I was doing something wrong.
It still happens...I can't find the actor.