Proper way to attach a value to a native
I'm playing around with a plugin that works sorta like a zombie infection mod where when players die they turn into zombies. Anyways, the teams switch at the end of the round and go to the other team (that they started on the round before). I created an array called g_pTeam[33], and I grab the value when they first join a team. After that, the mod changes their teams during the rounds, but at the end of the round, it gets their g_pTeam[id] value and changes it to the opposite team. Right now I get a couple players every round who do not swap right, I thought it was an issue with autobalance or limitteams, but they are both set to 0. I was just wondering if there was a more efficient way to do this.
Here is an example of the team swap. Quote:
Quote:
|
Re: Proper way to attach a value to a native
To get rid of that tag mismatch you need to declare g_pTeam as CsTeams.
PHP Code:
|
Re: Proper way to attach a value to a native
Show more code.
|
Re: Proper way to attach a value to a native
This is all the code that changes teams. It looks solid enough to me, but I know that I can't code for !%#^. Thank you very much for you help so far. I should've known the CsTeams: :P.
PHP Code:
PHP Code:
PHP Code:
|
Re: Proper way to attach a value to a native
PHP Code:
|
Re: Proper way to attach a value to a native
As a side note, you can replace :
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 00:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.