09-19-2012
|
140 |
The muffin man
Join Date: Sep 2011
Location: Burger Refuge
Posts: 2,262
|
I really don't get you guys, you're saying is this player object equivalent to "guild" it should be: PHP Code:
|
09-19-2012
|
142 |
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
Alright, so today I asked snk how do player.onHP() work... I got the major idea about it, I am still wondering of: how do they set the params about it? Let's say player.onHP(-50); would they have something like if (params[0] == "-50") or is there another way?
|
09-19-2012
|
143 | |
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
PHP Code:
PHP Code:
PHP Code:
PHP Code:
this is pretty barebone. you would be on your best way by joining the player to a class so you can call the functions with player.yourFunction() rather than with triggering the server or any other stuff. |
|
09-30-2012
|
146 |
299,792,458 m/s
Join Date: Mar 2012
Location: Lebanon
Posts: 3,581
|
So okay, I got those two scripts : PHP Code:
PHP Code:
Oh and if there is any way to make the player's dir follow the mouse coordinates would help too Can't seem to make them change on both X and Y. |
09-30-2012
|
147 |
The muffin man
Join Date: Sep 2011
Location: Burger Refuge
Posts: 2,262
|
Okay so you'll just have to copy and paste things into one weapon while watching out for clashes in indexes and variable names, bit of a no brainer tbh... Also with having the player direction follow your mouse you could just do: PHP Code:
There was a function that works that out as well but I can never remember it... |
09-30-2012
|
150 |
Registered User
Join Date: Sep 2011
Location: Germany
Posts: 6,122
|
why did you use thiso.flags? you only have to use it outside of the with() function if you are regarding it to a this.flag outside of the with() function. like PHP Code:
ps: what kind of sniper are you trying to do o.O just looks like a random crosshair being shown somewhere with a laggy player check |