15.10.2012, 07:30
PHP Code:
//above
new RapeTimer[MAX_PLAYERS][2];
forward raped();
forward RapedPlayerRecent();
new Raped[MAX_PLAYERS];
new RapedRecently[MAX_PLAYERS];
//under gamemodeint
SetTimer("raped",10000,1);
//connect + death
Raped[playerid] = 0;
RapedRecently[playerid] = 0;
//the remainder
public raped()
{
new Float:health;
GetPlayerHealth(playerid, health);
if(health > 5 && IsPlayerConnected(playeird))
{
SetPlayerHealth(playeird, health-5);
}
else if(health <= 5 && IsPlayerConnected(playerid))
{
new string[256];
new victim[24];
SetPlayerHealth(playerid, health-5);
GetPlayerName(playerid,victim, 24);
format(string, sizeof(string), "%s(%d) Has died from Chlamydia",victim,playerid);
SendClientMessageToAll(0xB22222AA,string);
}
return 1;
}
public RapedPlayerRecent()
{
RapedRecently[playerid] =0;
}
CMD:rape(playerid, params[])
{
new playerb;
if(sscanf(params, "u", playerb)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /rape [id]");
if(Job[playerid] != 1) return SendClientMessage(playerid, COLOR_WHITE,"Your Not a Rapist");
if(RapedRecently[playerb] == 1) return SendClientMessage(playerid, COLOR_WHITE,"He Was Recently Raped");
RapedRecently[playerb] = 1;
RapeTimer[playerb][0] = SetTimer("RapedPlayerRecent",60000,false);
RapeTimer[playerb][1] = SetTimer("raped",1,false);
SendClientMessage(playerb, COLOR_YELLOW, "You Have Been Raped, Visit the hospital");
SendClientMessage(playerid, COLOR_YELLOW, "You Have Been Raped, Visit the hospital");
return 1;
}