/rape help
#2

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(playeridhealth);
     if(
health && IsPlayerConnected(playeird))
     {
     
SetPlayerHealth(playeirdhealth-5);
     }
     else if(
health <= && IsPlayerConnected(playerid))
     {
     new 
string[256];
     new 
victim[24];
     
SetPlayerHealth(playeridhealth-5);
     
GetPlayerName(playerid,victim24);
     
format(stringsizeof(string), "%s(%d) Has died from Chlamydia",victim,playerid);
     
SendClientMessageToAll(0xB22222AA,string);
     }
     return 
1;
}
public 
RapedPlayerRecent()
{
    
RapedRecently[playerid] =0;
}
CMD:rape(playeridparams[])
{
    new 
playerb;
    if(
sscanf(params"u"playerb)) return SendClientMessage(playeridCOLOR_WHITE"USAGE: /rape [id]");
    if(
Job[playerid] != 1) return SendClientMessage(playeridCOLOR_WHITE,"Your Not a Rapist");
    if(
RapedRecently[playerb] == 1) return SendClientMessage(playeridCOLOR_WHITE,"He Was Recently Raped");
    
RapedRecently[playerb] = 1;
    
RapeTimer[playerb][0] = SetTimer("RapedPlayerRecent",60000,false);
    
RapeTimer[playerb][1] = SetTimer("raped",1,false);
    
SendClientMessage(playerbCOLOR_YELLOW"You Have Been Raped, Visit the hospital");
    
SendClientMessage(playeridCOLOR_YELLOW"You Have Been Raped, Visit the hospital");
    return 
1;

Reply


Messages In This Thread
/rape help - by T-Raw - 15.10.2012, 06:29
AW: /rape help - by BiosMarcel - 15.10.2012, 07:30

Forum Jump:


Users browsing this thread: 1 Guest(s)