[HELP]Disease(losing 10 hp every 10 secs)
#1

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

Reply
#2

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.
Reply
#3

oh wo im doing this... :P
Reply
#4

http://klutty.pastebin.com/f50aaf63f

Note: Untested! Not sure if it works, post here if you got any problems.
Reply
#5

I have a problem with it

if i use any cmd with /rape <id>

/cuff <id>
/hea; <id>

it always send ERROR:INVALID PLAYER
Reply
#6

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
Reply
#7

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
Reply
#8

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.
Reply
#9

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);
Reply
#10

well

i am using sscanf

maybe it doens't work with strtok together?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)