Jump to content
  • 0

Announce Pvp Consecutive?


Question

Posted (edited)

As I make for guard the amount of pvp of each player?

I used static variable and for loop, but all player use the same storage of pvp? 

I'm imagining on malloc, but I have no algorithm in mind.

Edited by Jamba

1 answer to this question

Recommended Posts

  • 0
Posted

static variable inside a function in C is a global variable that can be only accessed by the function that declared it, thats why all players use the same storage, remove static as its not necessary there, static variables are mainly used for buffers and just use GetTickCount win32 call to check for consecutive kills

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..