First of all if you are using classes (or something like that) you can optimize the code alot for eg in ZP MeRcyLeZZ uses different bools to identify a user's class like for a zombie player it would be this : g_zombie[id] or for survivor it would be this: g_survivor[id]
Instead you can use a single variable to store a player's class and update it whenever you want
If you cant understand then i will give you an example where MeRcyLeZZ forgot to optimize the code:
Instead of seperate bools to identify a player's class you can do it like this:
new g_players_class[ 33 ]
and on places where player changes class you can store it as a number
[In my eg zombie is taken as 1 and nemesis as 2]
g_players_class[ id ] = 1 // Means player is a zombie
Or like this
g_players_class[ id ] = 2 // Means player is a nemesis
And so you can use switch like this:
PHP Code:
switch( g_players_class[ id ] )
{
case CLASS_THUNDER:
{
// do stuff
}
case CLASS_CITIZEN:
{
// do stuff
}
}
__________________