Making a player die slowly.
#1

Hi, How can I make a player die slowly when he gets infected.
I want the player's health to decrease slowly.

PHP код:
CMD:rape(playeridparams[])
{
    if(
Team[playerid] == COPS || Team[playerid] == ARMY || Team[playerid] == FBI || Team[playerid] == SWAT) return SendClientMessage(playeridCOLOR_PARAMS"ERROR: Law Enforcements are not allowed to rape people.");
    new 
raped;
    if(
sscanf(params,"u"raped))  return SendClientMessage(playeridCOLOR_PARAMS"USAGE: /rape [playerid]");
    if(
raped == INVALID_PLAYER_ID) return SendClientMessage(playeridCOLOR_PARAMS"ERROR: The player ID entered didn't exist.");
    if(
raped == playerid) return SendClientMessage(playeridCOLOR_PARAMS"ERROR: You can't money/score farm, therefore, You can't rob yourself.");
    new 
rand random(4), string[250];
    switch(
rand)
    {
        case 
0:
        {
            
format(stringsizeof(string), "%s has been infected with Chlamydia"PlayerName(raped));
            
SendClientMessageToAll(COLOR_GREYstring);
        }
        case 
1:
        {
            
format(stringsizeof(string), "%s has been infected with Syphilis"PlayerName(raped));
            
SendClientMessageToAll(COLOR_GREYstring);
        }
        case 
2:
        {
            
format(stringsizeof(string), "%s has been infected with Gonorrhea"PlayerName(raped));
            
SendClientMessageToAll(COLOR_GREYstring);
        }
        case 
3:
        {
            
format(stringsizeof(string), "%s has been infected with Hepatitis B"PlayerName(raped));
            
SendClientMessageToAll(COLOR_GREYstring);
        }
    }
    return 
1;

Reply


Messages In This Thread
Making a player die slowly. - by ThePhenix - 26.06.2013, 03:34
Re: Making a player die slowly. - by Cjgogo - 26.06.2013, 07:25

Forum Jump:


Users browsing this thread: 1 Guest(s)