Kick_West
Умник
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(FazaMutant[playerid] == 1 && Player[damagedid][pFraction] != 1)
{
if(START_VIRUS{damagedid} == true) return 1;
if(DamagePlayerID[damagedid]) return 1;
DamagePlayerID[damagedid] = true;
SetPVarInt(playerid, "selicium", playerid);
SendClientMessage(damagedid, COLOR_REDD, "... Вас ударил мутант. У вас началось кровотечение");
}
return 1;
}
Код:
SetPVarInt(playerid, "selicium", playerid);
Код:
void OneSecondTimer()
{
foreach(new i : Player)
{
if (BotTime>0)
{
BotTime--;
if(BotTime<=0)
{
DestroyActor(BotPlayer);
BotPlayer = -1;
Take[GetPVarInt(i, "selicium")] = false;
}
}
if(IsPlayerConnected(i))
{
if(DamagePlayerID[i] == true)
{
new Float:Health;
GetPlayerHealth(i,Health);
Health = floatadd(Health,-10);
SetPlayerHealth(i, Health);
GetPlayerPos(i, KX, KY, KZ);
if(Health == 0.0)
{
SendClientMessage(i, COLOR_RED, "Вы заразились и через некоторое время станете мутантом, вылечиться можно купив вакцину");
BotPlayer = CreateActor(GetPlayerSkin(i), KX, KY, KZ,0.00);
SetActorVirtualWorld(BotPlayer, GetPlayerVirtualWorld(i));
SetActorInvulnerable(BotPlayer, true);
ApplyActorAnimation( BotPlayer , "CRACK","CRCKDETH2", 4.1, 0, 0, 0, 1, 1 );
BotTime = 20;
Take[GetPVarInt(i, "selicium")] = true;
START_VIRUS{i} = true;
// MessageMutant[GetPVarInt(i,"kkkk")] = true;
DamagePlayerID{i} = false;
}
}
if(Take[GetPVarInt(i,"selicium")] == true)
{
Player[GetPVarInt(i, "selicium")][pExr] += 1;
SATIETY[GetPVarInt(i, "selicium")] = NONE;
SendClientMessage(GetPVarInt(i, "selicium"), 0xAFAFAFFF, " Вы больше не голодны ");
SendClientMessage(GetPVarInt(i, "selicium"), COLOR_MUTANT, " Вы собрали плоть! Отнесите её на радар");
Take[GetPVarInt(i, "selicium")] = false;
}
}
}
return 1;
}
Код:
if(Take[GetPVarInt(i,"selicium")] == true)
{
Player[GetPVarInt(i, "selicium")][pExr] += 1;
SATIETY[GetPVarInt(i, "selicium")] = NONE;
SendClientMessage(GetPVarInt(i, "selicium"), 0xAFAFAFFF, " Вы больше не голодны ");
SendClientMessage(GetPVarInt(i, "selicium"), COLOR_MUTANT, " Вы собрали плоть! Отнесите её на радар");
Take[GetPVarInt(i, "selicium")] = false;
}
Вообщем эти сообщения приходят иногда мутанту( как надо ), а иногда может придти игроку которму нанесли урон, или вообще левому игроку, который не задействован, как это исправить, помогите пожалуйста!
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(FazaMutant[playerid] == 1 && Player[damagedid][pFraction] != 1)
{
if(START_VIRUS{damagedid} == true) return 1;
if(DamagePlayerID[damagedid]) return 1;
DamagePlayerID[damagedid] = true;
SetPVarInt(playerid, "selicium", playerid);
SendClientMessage(damagedid, COLOR_REDD, "... Вас ударил мутант. У вас началось кровотечение");
}
return 1;
}
Код:
SetPVarInt(playerid, "selicium", playerid);
Код:
void OneSecondTimer()
{
foreach(new i : Player)
{
if (BotTime>0)
{
BotTime--;
if(BotTime<=0)
{
DestroyActor(BotPlayer);
BotPlayer = -1;
Take[GetPVarInt(i, "selicium")] = false;
}
}
if(IsPlayerConnected(i))
{
if(DamagePlayerID[i] == true)
{
new Float:Health;
GetPlayerHealth(i,Health);
Health = floatadd(Health,-10);
SetPlayerHealth(i, Health);
GetPlayerPos(i, KX, KY, KZ);
if(Health == 0.0)
{
SendClientMessage(i, COLOR_RED, "Вы заразились и через некоторое время станете мутантом, вылечиться можно купив вакцину");
BotPlayer = CreateActor(GetPlayerSkin(i), KX, KY, KZ,0.00);
SetActorVirtualWorld(BotPlayer, GetPlayerVirtualWorld(i));
SetActorInvulnerable(BotPlayer, true);
ApplyActorAnimation( BotPlayer , "CRACK","CRCKDETH2", 4.1, 0, 0, 0, 1, 1 );
BotTime = 20;
Take[GetPVarInt(i, "selicium")] = true;
START_VIRUS{i} = true;
// MessageMutant[GetPVarInt(i,"kkkk")] = true;
DamagePlayerID{i} = false;
}
}
if(Take[GetPVarInt(i,"selicium")] == true)
{
Player[GetPVarInt(i, "selicium")][pExr] += 1;
SATIETY[GetPVarInt(i, "selicium")] = NONE;
SendClientMessage(GetPVarInt(i, "selicium"), 0xAFAFAFFF, " Вы больше не голодны ");
SendClientMessage(GetPVarInt(i, "selicium"), COLOR_MUTANT, " Вы собрали плоть! Отнесите её на радар");
Take[GetPVarInt(i, "selicium")] = false;
}
}
}
return 1;
}
Код:
if(Take[GetPVarInt(i,"selicium")] == true)
{
Player[GetPVarInt(i, "selicium")][pExr] += 1;
SATIETY[GetPVarInt(i, "selicium")] = NONE;
SendClientMessage(GetPVarInt(i, "selicium"), 0xAFAFAFFF, " Вы больше не голодны ");
SendClientMessage(GetPVarInt(i, "selicium"), COLOR_MUTANT, " Вы собрали плоть! Отнесите её на радар");
Take[GetPVarInt(i, "selicium")] = false;
}
Вообщем эти сообщения приходят иногда мутанту( как надо ), а иногда может придти игроку которму нанесли урон, или вообще левому игроку, который не задействован, как это исправить, помогите пожалуйста!
