Lowering health after using /rape command
#1

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

pawn Код:
new Float:Health;
SetPlayerHealth(playerid, GetPlayerHealth(playerid, Health) - 1);
Reply
#3

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;
}
Reply
#4

when i use that the other player die instantly
Reply
#5

Than you are doing something that isn't in the code I wrote.
Reply
#6

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

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

Quote:
Originally Posted by dominik523
Посмотреть сообщение
pawn Код:
SetPlayerHealth(playerid, GetPlayerHealth(playerid) - 1); // put your value here
Do you know how to use GetPlayerHealth?
Reply
#9

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).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)