Jump to content
  • 0

Announce Pvp Consecutive?


Naelson

Question

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
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...