![]() |
Referencing Weapons Clientside
So I know from experience that referencing weapons clientside can be done in multiple ways, the easiest two probably being the following.
Method 1: Weapon NPC Foo PHP Code:
PHP Code:
Weapon NPC Foo PHP Code:
PHP Code:
|
You can omit the parentheses if the name doesn't contain any special characters:
PHP Code:
PHP Code:
PHP Code:
The (minimal) added benefit is that you can avoid using parentheses (no dashes), you're reminded that other scripts might be calling it, and you avoid trouble with renames. There might be some benefit to the findWeapon syntax in that you can avoid conflicts between other objects, but I've never really seen that happen in all the time I was coding. |
Chris beat me to it. I spent to much time looking for the tips and trick's thread dusty started. I think who was it crow? that mentioned that?
|
Quote:
|
Quote:
Quote:
|
¯\(´-´)/¯
|
All times are GMT +2. The time now is 04:38 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.