pawn Код:
forward CarCheck();
public CarCheck()
{
new string[128];
TraceLastCall();
for(new j = 0; j<MAX_PLAYERS; j++)
{
if(IsPlayerConnected(j))
{
new Float:health;
GetPlayerHealth(j, health);
GetPlayerName(j, sendername, sizeof(sendername));
// -============ Cancer ============- //
if(Informacion[j][pCancer] > 250 && Informacion[j][pCancer] < 300)
{
if(CancerEffect[j] > 30)
{
SetHP(j, health-20);
format(string, sizeof(string), "* %s tose.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
CancerEffect[j] = 0;
Informacion[j][pCancer] += 3;
}
CancerEffect[j] += 1;
}
if(Informacion[j][pCancer] > 300 && Informacion[j][pCancer] < 400)
{
if(CancerEffect[j] > 30)
{
SetHP(j, health-30);
format(string, sizeof(string), "* %s tose.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
CancerEffect[j] = 0;
Informacion[j][pCancer] += 6;
}
CancerEffect[j] += 1;
}
if(Informacion[j][pCancer] > 400 && Informacion[j][pCancer] < 600)
{
if(CancerEffect[j] > 30)
{
SetHP(j, health-40);
format(string, sizeof(string), "* %s tose.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
CancerEffect[j] = 0;
Informacion[j][pCancer] += 10;
}
CancerEffect[j] += 1;
}
// -===================== Epilepsia =================- //
if(cEpilepsia[j] == 0)
{
if(Informacion[j][pEpilepsia] > 250 && Informacion[j][pEpilepsia] < 350)
{
if(EpilepsiaCrack[j] > 50)
{
ApplyAnimation(j, "CRACK", "crckdeth2", 2.5, 0, 0, 0, 1, 60000);
ApplyAnimation(j, "CRACK", "crckdeth2", 2.5, 0, 0, 0, 1, 60000);
format(string, sizeof(string), "* %s se cae y empieza a echar saliva.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
EpilepsiaCrack[j] = 0;
Informacion[j][pEpilepsia] += 10;
SetHP(j, health-30);
SetPlayerDrunkLevel(j, 30000);
}
EpilepsiaCrack[j] += 1;
}
if(Informacion[j][pEpilepsia] > 350 && Informacion[j][pEpilepsia] < 600)
{
if(EpilepsiaCrack[j] > 50)
{
ApplyAnimation(j, "CRACK", "crckdeth1", 2.5, 0, 0, 0, 1, 90000);
ApplyAnimation(j, "CRACK", "crckdeth1", 2.5, 0, 0, 0, 1, 90000);
format(string, sizeof(string), "* %s se cae y empieza a echar saliva.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
EpilepsiaCrack[j] = 0;
Informacion[j][pEpilepsia] += 20;
SetHP(j, health-40);
SetPlayerDrunkLevel(j, 40000);
}
EpilepsiaCrack[j] += 1;
}
if(Informacion[j][pEpilepsia] > 600)
{
if(EpilepsiaCrack[j] > 50)
{
ApplyAnimation(j, "CRACK", "crckdeth3", 2.5, 0, 0, 0, 1, 120000);
ApplyAnimation(j, "CRACK", "crckdeth3", 2.5, 0, 0, 0, 1, 120000);
format(string, sizeof(string), "* %s se cae y empieza a echar saliva.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
EpilepsiaCrack[j] = 0;
Informacion[j][pEpilepsia] += 30;
SetHP(j, health-60);
SetPlayerDrunkLevel(j, 50000);
//new death = random(10);
//if(death == 2) { PlayerHasDeath(j, 2); }
}
EpilepsiaCrack[j] += 1;
}
}
// -==================== SIDA ======================- //
if(Informacion[j][pSIDA] > 0 && Informacion[j][pSIDA] < 2)
{
if(SIDA[j] > 30)
{
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 5000);
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 5000);
format(string, sizeof(string), "* %s vomita.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(health > 15) { SetHP(j, health-50); }
}
SIDA[j] -= 1;
}
if(Informacion[j][pSIDA] > 1 && Informacion[j][pSIDA] < 3)
{
if(SIDA[j] > 20)
{
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 10000);
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 10000);
format(string, sizeof(string), "* %s vomita.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(health > 15) { SetHP(j, health-76); }
}
SIDA[j] -= 1;
}
if(Informacion[j][pSIDA] > 3)
{
if(SIDA[j] > 10)
{
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 15000);
ApplyAnimation(j, "FOOD", "EAT_Vomit_P", 3.0, 0, 0, 0, 0, 15000);
format(string, sizeof(string), "* %s vomita.", sendername);
ProxDetector(30.0, j, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(health > 15) { SetHP(j, health-70); }
}
SIDA[j] -= 1;
}
}
}
return 1;
}