Lowering health after using /rape command -
MrViolence101 - 05.12.2014
Hey guys.
Can anyone help me with a certain part of my rape command where if the player uses the rape command on someone it must lower their health by the time. something like a timer or what?
Re: Lowering health after using /rape command -
UltraScripter - 05.12.2014
pawn Код:
new Float:Health;
SetPlayerHealth(playerid, GetPlayerHealth(playerid, Health) - 1);
Re: Lowering health after using /rape command -
dominik523 - 05.12.2014
pawn Код:
new RapeTime[MAX_PLAYERS];
new RapeTimer[MAX_PLAYERS];
RapeTimer[playerid] = SetTimerEx("LowerHealth", 1000, true, "d", playerid);
forward public LowerHealth(playerid);
public LowerHealth(playerid)
{
if(RapeTime[playerid] >= 30)
{
KilltTimer(RapeTimer[playerid]);
return 1;
}
SetPlayerHealth(playerid, GetPlayerHealth(playerid) - 1); // put your value here
RapeTime[playerid] ++;
return 1;
}
Re: Lowering health after using /rape command -
MrViolence101 - 05.12.2014
when i use that the other player die instantly
Re: Lowering health after using /rape command -
dominik523 - 05.12.2014
Than you are doing something that isn't in the code I wrote.
Re: Lowering health after using /rape command -
MrViolence101 - 05.12.2014
Quote:
Originally Posted by dominik523
pawn Код:
new RapeTime[MAX_PLAYERS]; new RapeTimer[MAX_PLAYERS]; RapeTimer[playerid] = SetTimerEx("LowerHealth", 1000, true, "d", playerid); forward public LowerHealth(playerid); public LowerHealth(playerid) { if(RapeTime[playerid] >= 30) { KilltTimer(RapeTimer[playerid]); return 1; } SetPlayerHealth(playerid, GetPlayerHealth(playerid) - 1); // put your value here RapeTime[playerid] ++; return 1; }
|
how do i implement this into my command, in /rape
Re: Lowering health after using /rape command -
MohanedZzZ - 05.12.2014
Features
• Highly customisable colors and antispam time
• Chance of getting an STD from /rape
• Attempt to cure yourself with /cure
• Antispam to prevent command spam
• STDs lower your health every few seconds
• STDs will be removed on death
• You cannot rape yourself(sick bastard)
Here you go:
http://pastebin.com/f8393df9
Credits goes to bogeymanEST.
Re: Lowering health after using /rape command -
Threshold - 06.12.2014
Quote:
Originally Posted by dominik523
pawn Код:
SetPlayerHealth(playerid, GetPlayerHealth(playerid) - 1); // put your value here
|
Do you know how to use
GetPlayerHealth?
Re: Lowering health after using /rape command -
iiNzTicTx - 06.12.2014
Quote:
Originally Posted by MrViolence101
how do i implement this into my command, in /rape
|
Put 'SetTimerEx', inside your command (/rape).
Then the rest of it, lies outside any public or other types of functions (defining variables ect, should be of course at the top of your code).