new Diseases[][] { "HIV", "Syphilis", "Crazy Chicken Flu", "Mad Cow Disease", "Nothing" };
GetPlayerName(playerid, RapistName, 24); GetPlayerName(targetid, VictimName, 24); new rand = random(sizeof(Diseases)); format(string, 128, "You have just raped %s and gave them %s!", VictimName, rand);
new DiseasesNamesNumber = 6;
new Diseases[][]
{
"HIV",
"Syphilis",
"Crazy Chicken Flu",
"Mad Cow Disease",
"Nothing"
};
enum pInfo // Maybe this will be useful for you later.
{
pDiseases
};
new Got;
new rand;
rand = random(DiseasesNamesNumber);
if(Got <= 0)
{
SendClientMessage(playerid, COLOR_GREY, "You didn't got any Diseases.");
return 1;
}
else if(rand == 0)
{
SendClientMessage(playerid, COLOR_GREY, "You got HIV now! Go and see a doctor.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-10);
return 1;
}
else if(rand == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You got Syphilis now! Go and see a doctor.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-20);
return 1;
}
else if(rand == 2)
{
SendClientMessage(playerid, COLOR_GREY, "You got Crazy Chicken Flu now! Go and see a doctor.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-30);
return 1;
}
else if(rand == 3)
{
SendClientMessage(playerid, COLOR_GREY, "You got Mad Cow Disease now! Go and see a doctor.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-40);
return 1;
}
enum pInfo
{
pDiseases
};
public OnPlayerConnect
PlayerInfo[playerid][pDiseases]
public OnPlayerLogin
PlayerInfo[playerid][pDiseases] = dini_Int(string2,"Diseases"); // Just Like this.
PlayerInfo[playerid][pDiseases] = The Diseases ID.
else if(rand == 1)
{
SendClientMessage(playerid, COLOR_GREY, "You got Syphilis now! Go and see a doctor.");
SetPlayerHealth(playerid, GetPlayerHealth(playerid)-20);
PlayerInfo[playerid][pDiseases] = 1;
return 1;
}
public OnPlayerConnect PlayerInfo[playerid][pDiseases] |