15.10.2012, 06:29
Code:
//above
forward raped();
forward RapedPlayerRecent();
new Raped[MAX_PLAYERS];
new RapedRecently[MAX_PLAYERS];
//under gamemodeint
SetTimer("RapedPlayerRecent",60000, true);
SetTimer("raped",10000,1);
//connect + death
Raped[playerid] = 0;
RapedRecently[playerid] = 0;
//the remainder
public raped()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
new Float:health;
GetPlayerHealth(i, health);
if(Raped[i] == 1 && health > 5 && Raped[i] == 1 && IsPlayerConnected(i))
{
SetPlayerHealth(i, health-5);
}
else
if(Raped[i] == 1 && health <= 5 && Raped[i] == 1 && IsPlayerConnected(i))
{
new string[256];
new victim[24];
SetPlayerHealth(i, health-5);
GetPlayerName(i,victim, 24);
format(string, sizeof(string), "%s(%d) Has died from Chlamydia",victim,i);
SendClientMessageToAll(0xB22222AA,string);
}
}
}
public RapedPlayerRecent()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(RapedRecently[i] == 1)
{
RapedRecently[i] =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;
Raped[playerb] = 1;
SendClientMessage(playerb, COLOR_YELLOW, "You Have Been Raped, Visit the hospital");
SendClientMessage(playerid, COLOR_YELLOW, "You Have Been Raped, Visit the hospital");
return 1;
}
anybody can fix this pleasehelp

