![]() |
Script Help
I have a simple drag script and was wondering how to freeze the player being dragged through the air with freezeplayer2();. Any suggestions?
|
You could do it in a few ways. Set a variable like client.isfrozen which can be read client side and checked in a time out. If true, freeze otherwise don't. This variable could be used in other scripts as well. You would have to make sure you unset the variable when player logins in case they disconnect whilst being dragged.
Another option is to trigger the player when they need to be frozen. This could be part of a weapon e.g. 'Movement' or 'System' or even in a class the player object has joined I.e. player.freezeplayer(int) which will trigger client side and then freeze the player. You would then have another option to unfreeze them. This way means no timeouts so less CPU time. |
Thank you (+rep). Also, I've removed opening a player's profile so I can add some player options to them. I want a drop down GUI to pop up next to the player when I right click them. Is there an if() statement to detect if someone right clicked their mouse on the player?
|
Nothing like that. Instead, you can use findnearestplayer(float x, float y) in a function onMouseDown e.g.
PHP Code:
Note: there won't be a limit on range. If you only want players within 5 tiles, you will either need to test distance using the returned obj(s) or custom function e.g. PHP Code:
|
That's all! Thank you.
|
New question. I have a small bar with NPCs in it. I only want staff to go through the npc door that warps you to the other level. So far, I have the tag Owner to be able to warp. It works, but I want it to work for all the staff specified in the server options. Here's what I have so far. I'm thinking it was an if() statement in there somewhere.
PHP Code:
|
Quote:
PHP Code:
|
You've been a great help :)
I'll test it right away I tested it, didn't work. I think it's because instead of player.guild, it should be the player's community name/graal ID. |
Quote:
|
It's a door? What abuse am I creating with a staff room?
Thanks anyway. |
Quote:
|
"You must spread some reputation before giving it to Tricxta again"
Quote:
|
Quote:
|
PHP Code:
|
Quote:
PHP Code:
PHP Code:
PHP Code:
|
| All times are GMT. The time now is 11:29 AM. |
Powered by vBulletin/Copyright ©2000 - 2025, vBulletin Solutions Inc.