! anything means "not equal to" or "non existant", so if "player" = 0, then !player is true.
Also, if I do this:
Code:
new player = 1
if (player != 0)
{
client_print(0,print_chat,"lol internet")
}
player != 0 would be true, because player = 1, so it does not equal 0.
However, if I do this:
Code:
new player = 0
if (player != 0)
{
client_print(0,print_chat,"lol internet")
}
It would not be true, so clients would not have "lol internet" printed on their screens.
Also remember that any variable initiliazed but not given a value is automatically 0, so theoretically this would be the same as the one above:
Code:
new player
if (player != 0)
{
client_print(0,print_chat,"lol internet")
}
__________________