![]() |
Triggeraction
I've used it before, never really understood it. Can someone please explain to me what its used for, how to use it properly, and an example? And, please, in detail?
Thanks |
triggeraction(x, y, action, name, param0, param1, etc..);
if x and y is NULL/0, it will send a trigger to the action in the wnpc called 'name' else it will trigger any objects at x and y, then call the action on the object PHP Code:
triggerserver(gui, this.name, param0, param1, etc..); triggerclient(gui, this.name, param0, param1, etc..); those functions is often used to get from client to server or vice versa I hope this helps alittle :) |
PHP Code:
Say you have a weapon called a Hammer: PHP Code:
PHP Code:
Triggeraction can also communicate between the clientside and serverside, but I recommend triggerserver/triggerclient. Mainly because they're made specifically for that, and triggeraction was only used because it was the only available method. They do the same thing anyways, and since you're now learning, it's not like you're going to have to break the habit. |
I didn't think you needed to use "gui" in a triggerclient? I've always done
triggerclient(this.name, "action", params); |
"gui" or "weapon", as Stefan said.
|
Quote:
|
"gui" is easier for me, I'm used to it.
Also, use clientr.hammerstr; client.hammerstr would be hacked easily. |
T'was an example :P
|
Quote:
|
Quote:
Would be an integer, percent, 0-100 |
Just because you don't have to use it, doesn't mean it's the most efficient. Just because I can use 50 loops inside each other doesn't mean I shouldn't just do something the way it's supposed to be done. If it's meant to be included, you should do it in good practice.
|
Quote:
You fail to understand how a memory editor works then. |
| All times are GMT +2. The time now is 01:42 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.