[HELP]Disease(losing 10 hp every 10 secs) - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Disease(losing 10 hp every 10 secs) (
/showthread.php?tid=87528)
[HELP]Disease(losing 10 hp every 10 secs) -
Henk13 - 20.07.2009
How can i make a sort of disease system like if a player gets infected by /infect or /rape that the player who is infected or raped every 10 secs will lose 10 hp?
Help plz
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Klutty - 20.07.2009
Make a timer of an interval on 10 seconds and then make it setplayerhealth(playerid, -10); on the callback that is made by the timer.
Re: [HELP]Disease(losing 10 hp every 10 secs) -
denbo1 - 20.07.2009
oh wo im doing this... :P
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Klutty - 20.07.2009
http://klutty.pastebin.com/f50aaf63f
Note: Untested! Not sure if it works, post here if you got any problems.
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Pawno_Master - 20.07.2009
I have a problem with it
if i use any cmd with /rape <id>
/cuff <id>
/hea; <id>
it always send ERROR:INVALID PLAYER
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Klutty - 20.07.2009
Quote:
Originally Posted by ekeleke
I have a problem with it
if i use any cmd with /rape <id>
/cuff <id>
/hea; <id>
it always send ERROR:INVALID PLAYER
|
Wait, let me test the /rape cmd.
EDIT: You cant use it on yourself - do it on someone else
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Pawno_Master - 20.07.2009
But i used it on someone else
but it says ERROR: INALID PLAYER Id
on EVERY command i made jast after i putted your script in the game
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Klutty - 21.07.2009
Quote:
Originally Posted by ekeleke
But i used it on someone else
but it says ERROR: INALID PLAYER Id
on EVERY command i made jast after i putted your script in the game
|
Maybe try to remove all the "new tmp" if you already have it, and try to increase the "new tmp[128]" to a higher size.
Re: [HELP]Disease(losing 10 hp every 10 secs) -
MadeMan - 21.07.2009
pawn Код:
SetPlayerHealth(playerid, -10.0);
isn't it setting players health to -10? That means player will die instantly.
I suggest this:
pawn Код:
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health - 10);
Re: [HELP]Disease(losing 10 hp every 10 secs) -
Pawno_Master - 21.07.2009
well
i am using sscanf
maybe it doens't work with strtok together?