Damage Protection(createplayerobject)
#1

Hey guys, let me explain, this is regarding my new mode.

When a base is destroyed the base goes into what is known as damage protection, this means the base can no longer be attacked until it's repaired, if the player attacks someone while under protection.. their protection is removed an they again become vulnerable to attacks.

How should I go about storing the playerobject for the other players?, keep in mind that I need to make the exception for 100 players that can be under protection at once.. thats 100 protection objects that can possibly be created for each single player, obviously the playerobject won't be created for the ones that have the protection(enabling them to leave base an so on).



In short, is there a way to do this without creating 100 player variables for each player?



Thanks for reading, I hope someone can help me with an alternative idea .
Reply
#2

If you use SetPlayerAttachedObject it will never give you solid object.

You should use a scripted protection type god mod with range sync.
Reply
#3

What, objects? Array?
Reply
#4

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
What, objects? Array?
Can you give a small example of an array which can store 100 objects for every player slot please?

You mean something like 'new PlayerBaseProtection[MAX_PLAYERS][99];'?


EDIT: That works great, thanks heaps sickattack!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)