Pawn tutorial help please...
Code:
public cmd_hp(id, level, cid)in the code: new player = cmd_target(id, Arg1, 1) if (!player) what is "!player" means? why is the "!" mark is infront of player? what function does it gives player? |
! anything means "not equal to" or "non existant", so if "player" = 0, then !player is true.
Also, if I do this: Code:
player != 0 would be true, because player = 1, so it does not equal 0. However, if I do this: Code:
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:
|
| All times are GMT -4. The time now is 14:20. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.