Killstreak Code with Sound

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.

Yes your exactly right, but you cannot learn to code in the gunz source if you have no idea where to start. Also why post this unnecessary comment if your not even going to bother helping.
 
Upvote 0
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.

what's happend to do gunz is dead??
 
Upvote 0
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:
 
Upvote 0
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:

Why do you think the "Request" option is put there for.
 
Upvote 0
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:
Upvote 0
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:
Upvote 0
and for sounds

at peerdiemessage above the kill streak messages

if(pAttacker->GetUID() == ZGetGameClient()->GetUID()) // will only play the sound for the person on the kill streak we dont want everyone hearing :)
{
//play sound
}



p.s anyones welcome to make a tut/release out of this just gimme credits
 
Last edited:
Upvote 0
Back