Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PAINT] mode as stage modifier

Skilled Illusionist
Joined
Sep 30, 2009
Messages
320
Reaction score
7
Im not much good in coding though, would someone like to help me for Pemanent bullet holes on paint mode only and normal bullet holes that dissappear on normal games

this is something i did and im not able to find it.

i need to know how to get permanent bullet holes on [paint] mode

Code:
ZEffectBulletMarkList.cpp

void ZEffectBulletMarkList::Update(float fElapsed) 
    {
        	if(strstr(ZGetGameClient()->GetStageName(), "[paint]")); {
            	if(strstr(ZGetGameClient()->GetStageName(), "[PAINT]")); {
                for(iterator i=begin();i!=end();) {
                    ZEFFECTBULLETMARKITEM *p = (ZEFFECTBULLETMARKITEM*)*i;
                    p->fElapsedTime+=fElapsed;
                    if( p->fElapsedTime > m_fLifeTime )
                    {
                        delete p;
                        i=erase(i);
                        continue;
                    }
                    float fVanish = min(1,max(0,(m_fLifeTime - p->fElapsedTime)/m_fVanishTime));
                    DWORD color = ((DWORD)(fVanish * 255))<<24 | 0xffffff;
                    p->v[0].color = color;
                    p->v[1].color = color;
                    p->v[2].color = color;
                    p->v[3].color = color;
                    i++;
                }
            }
        }
    }

Code:
void ZEffectManager::AddBulletMark(rvector& Target, rvector& TargetNormal)
{
	if(g_nEffectLevel > Z_VIDEO_EFFECT_NORMAL) return; // ÇϱÞÀº »ý·«~
int nBulletCount = 0;
  //Check for paintball mode
	if(strstr(ZGetGameClient()->GetStageName(), "[paint]")||strstr(ZGetGameClient()->GetStageName(), "[PAINT]"))

     {
        switch(rand()%7+1) { //edit 7 to increase paintball count
                case 1:
                    {
                        m_PaintballMarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
                case 2:
                    {
                        m_Paintball2MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
                case 3:
                    {
                        m_Paintball3MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                case 4:
                    {
                        m_Paintball4MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
                case 5:
                    {
                        m_Paintball5MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
                case 6:
                    {
                        m_Paintball6MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
                case 7:
                    {
                        m_Paintball7MarkList.Add(Target+TargetNormal, TargetNormal);
                        nBulletCount++;
                    }
                    break;
            }
        if(rand()%1)
            m_BulletMarkList.Add(Target+TargetNormal,TargetNormal);
    } else {
        m_BulletMarkList.Add(Target+TargetNormal,TargetNormal);
    }

	ZEffect* pNew = NULL;
	pNew = new ZEffectSlash(m_pBulletOnWallEffect[rand()%BULLETONWALL_COUNT],Target,TargetNormal);
	((ZEffectSlash*)pNew)->SetAlignType(1);
	Add(pNew);
}
 
Junior Spellweaver
Joined
Aug 25, 2014
Messages
167
Reaction score
18
I already coded it.. very easy.
btw, this code is not completely.
 
Upvote 0
Skilled Illusionist
Joined
Sep 30, 2009
Messages
320
Reaction score
7
Im.just stuck in the bullet part, would you like to share your work or just these 2 parts ?, Ive already coded and tried to solve it im still facing that issue
 
Upvote 0
Junior Spellweaver
Joined
Aug 25, 2014
Messages
167
Reaction score
18
Im.just stuck in the bullet part, would you like to share your work or just these 2 parts ?, Ive already coded and tried to solve it im still facing that issue
What is your problem ??
 
Upvote 0
Junior Spellweaver
Joined
Aug 25, 2014
Messages
167
Reaction score
18
Permanent bullet holes on the paintball mode only?
That's mean normal stages will have a normal bullet (not permanent).?
 
Upvote 0
Junior Spellweaver
Joined
Jun 14, 2015
Messages
123
Reaction score
20
i think something like should do it

seems like you had roughly the right idea, you just forgot to negate the "strstr" checks (since it returns null if not found), and you have semicolons after the if's, which is a common beginner mistake. having semicolons there has empty statements act as the target for the if, so the block you wanted to have conditional runs unconditionally instead.
 
Upvote 0
Skilled Illusionist
Joined
Sep 30, 2009
Messages
320
Reaction score
7
i think something like should do it

seems like you had roughly the right idea, you just forgot to negate the "strstr" checks (since it returns null if not found), and you have semicolons after the if's, which is a common beginner mistake. having semicolons there has empty statements act as the target for the if, so the block you wanted to have conditional runs unconditionally instead.

i seriously love you mahn :p thanks alot :D it means alot to me i was soo pissed of behind this for 2 hours :p
thank you Keristrasza, cheers :D
 
Upvote 0
Back
Top