Can anybody provide me with a working killstreaks script that play sound when a certain amount of kills get reached?
Thanks
Can anybody provide me with a working killstreaks script that play sound when a certain amount of kills get reached?
Thanks
me too need to this but i had one but not working idk why
i know the code for the sounds lol
Start learning to code, don't even attempt to create a new GunZ Server if you don't want to learn how to code.
GunZ is dead, unless you can make a highly modificated client, you have no chance of your server getting populated.
Besides, doing it yourself gives you more experience in coding which might be usefull later in your life.
Gunz is dying, not many people like it as much as they used to.
You are simply asking 'us' to provide you with a script, which doesn't give the impression you want to learn to code.
If you ever had put a small effort in searching you would've already found a site to learn C++
Anyway to make your life a bit easier: Learn C++
Just look into the same codes as the "Fantasy", "You killed them all", etc sound.
basically MMatchServer::OnGameKill(MUID a, MUID b)
that void right there you can design a kill streak on very easily and efficiently, its what i did with ugg.
Thanks, ill give it a go.
sorry i ment MMatchServer::PostGameDeadOnGameKill(MUID& uidStage, MMatchObject* pAttacker, MMatchObject* pVictim,
int nAddedAttackerExp, int nSubedVictimExp)
then for the struct MMatchObject add a int KillStreak; then at MMatchObject() { KillStreak = 0;}
then find C(MC_MATCH_GAME_DEAD, "Game.Dead", "Game.Dead", MCDT_MACHINE2MACHINE)
and add P(MPT_INT, "KillStreak"); under the
P(MPT_UINT, "VictimArg"); // Exp | °æÇèÄ¡ÆÛ¼¾Æ®
then replace the old postgamedeadongamekill with this
void MMatchServer::PostGameDeadOnGameKill(MUID& uidStage, MMatchObject* pAttacker, MMatchObject* pVictim,
int nAddedAttackerExp, int nSubedVictimExp)
{
unsigned long int nAttackerArg = 0;
unsigned long int nVictimArg =0;
int nRealAttackerLevel = pAttacker->GetCharInfo()->m_nLevel;
int nRealVictimLevel = pVictim->GetCharInfo()->m_nLevel;
unsigned long int nChrExp;
int nPercent;
nChrExp = pAttacker->GetCharInfo()->m_nXP;
nPercent = MMatchFormula::GetLevelPercent(nChrExp, nRealAttackerLevel);
nAttackerArg = MakeExpTransData(nAddedAttackerExp, nPercent);
nChrExp = pVictim->GetCharInfo()->m_nXP;
nPercent = MMatchFormula::GetLevelPercent(nChrExp, nRealVictimLevel);
nVictimArg = MakeExpTransData(nSubedVictimExp, nPercent);
pAttacker->KillStreak++;
pVictim->KillStreak = 0;
MCommand* pCmd = CreateCommand(MC_MATCH_GAME_DEAD, MUID(0,0));
pCmd->AddParameter(new MCommandParameterUID(pAttacker->GetUID()));
pCmd->AddParameter(new MCommandParameterUInt(nAttackerArg));
pCmd->AddParameter(new MCommandParameterUID(pVictim->GetUID()));
pCmd->AddParameter(new MCommandParameterUInt(nVictimArg));
pCmd->AddParameter(new MCommandParameterInt(pAttacker->KillStreak));
RouteToBattle(uidStage, pCmd);
}
change to this(both of them)
OnPeerDead(const MUID& uidAttacker, const unsigned long int nAttackerArg,
const MUID& uidVictim, const unsigned long int nVictimArg, int Kills);
^^ also at the end of this void after
CheckKillSound(pAttacker);
change
OnPeerDieMessage(pVictim, pAttacker); to OnPeerDieMessage(pVictim, pAttacker, Kills);
and change to this(both of them)
OnPeerDieMessage(ZCharacter* pVictim, ZCharacter* pAttacker, int Kills)
then make this like this
case MC_MATCH_GAME_DEAD:
{
MUID uidAttacker, uidVictim;
unsigned long int nAttackerArg, nVictimArg;
int Kills;
pCommand->GetParameter(&uidAttacker, 0, MPT_UID);
pCommand->GetParameter(&nAttackerArg, 1, MPT_UINT);
pCommand->GetParameter(&uidVictim, 2, MPT_UID);
pCommand->GetParameter(&nVictimArg, 3, MPT_UINT);
pCommand->GetParameter(&Kills, 4, MPT_INT);
OnPeerDead(uidAttacker, nAttackerArg, uidVictim, nVictimArg, Kills);
}
break;
then goto onpeerdiemessage and at the end before the last } add
sprintf(szMsg, "%s is on a %d kill streak!", szAttacker, Kills);
ZChatOutput(MCOLOR(0xFF707070), szMsg);
ive given you anoth now lol the sounds you can do yourself, this code is untested but in theory should work any issues let me know
Last edited by own_prox; 06-06-13 at 02:51 AM.
<3<3<3<3 Thank you soo much!
no problem mate always happy to help only took around a min or 2 to write up
another example for at the end of onpeerdiemessage
bool bmsg = true;
switch(Kills)
{
case 4:
sprintf(szMsg, "%s is on a %d kill streak!", szAttacker, Kills);
break;
case 8:
sprintf(szMsg, "%s is Pwning with a %d kill streak!", szAttacker, Kills);
break;
case 12:
sprintf(szMsg, "%s is Dominating with a %d kill streak!", szAttacker, Kills);
break;
default:
if(Kills >= 12)
{
sprintf(szMsg, "%s is Unstoppable with a %d kill streak!", szAttacker, Kills);
} else bmsg = false;
break;
}
if(bmsg)
{
ZChatOutput(MCOLOR(0xFF707070), szMsg);
}
Last edited by own_prox; 06-06-13 at 02:51 AM.