Raised This Month: $94 Target: $400
 23% 

Freeze `em


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   v3x (159)
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-01-2006 , 23:02   Freeze `em
Reply With Quote #1

Freeze `em

Description
=======

Allows the admin to "freeze" players. What it does is make them unable to move around, forces their knife on them and makes them glow a blueish color.

Commands
=======

amx_freeze <target> - Freezes the target player.
amx_unfreeze <target> - Unnfreezes the target player.

Modules
=====

Fun
Attached Files
File Type: sma Get Plugin or Get Source (freeze.sma - 2334 views - 2.1 KB)
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-02-2006 , 00:01  
Reply With Quote #2

You need to hook the CurWeapon event and set the speed in there as well I believe.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-02-2006 , 09:15  
Reply With Quote #3

Some tips that really don't matter:
1. Hook client_disconnect rather than client_putinserver, as client_disconnect is always called yet the others aren't.
2. Rather than using frozen[id] == true and frozen[id] == false, use frozen[id] and !frozen[id]. I'm not sure about this one, but I think it's actually faster in practice.
3. This one is important. Throughout the entire thing, you freeze "id", right after you get the target as "tar". Have you even tested this? It looks like it would freeze the person using it.
4. You randomly use semicolons then stop using them half way. Also, you use the bracket skipping technique twice:
Code:
if(!cmd_access(id, level, cid, 2))         return 1;
And then fail to use it here:
Code:
public client_putinserver(id) {     frozen[id] = false }
5. Implement v3x's suggestion.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 04-02-2006 , 10:30  
Reply With Quote #4

Code:
#pragma semicolon 1
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-02-2006 , 11:40  
Reply With Quote #5

Lol.

Yes I tested it, works fine.

Well I'm not really used to the whole semi colon thing, but it's more effiecient right? Whne you add them after every line.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 04-02-2006 , 11:46  
Reply With Quote #6

good job.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 04-02-2006 , 11:54  
Reply With Quote #7

Quote:
Originally Posted by Kensai
Lol.

Yes I tested it, works fine.

Well I'm not really used to the whole semi colon thing, but it's more effiecient right? Whne you add them after every line.
It's not even done correctly though. This will never get approved in this condition.

EDIT: Semicolons do absolutely nothing. If you plan on learning any C-based language, then you should use semicolons to get into the habit. If you don't plan on doing as such, then don't use them.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-02-2006 , 12:16  
Reply With Quote #8

Alrighty.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 04-02-2006 , 13:05  
Reply With Quote #9

Quote:
Originally Posted by Kensai
...
Yes I tested it, works fine.
...
Not it wouldn't. It will only freeze the target and say to the target You have been Frozen. But the admin who used the command would glow. and you could only freeze one person at a time because you check to see if the admin using the command is frozen and then set him as frozen. And you do the same with the unfreezing.

Before this is approved do the things the above have said with fixing these problems. And you should implement using ML it would make this that much better.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 04-02-2006 , 13:23  
Reply With Quote #10

Right, sorry I'm retarded today.

Added the fixes, correctly I hope, and I'm off to test it.

EDIT: Okay, tested this one, works, and hooked the weapon event.

But for some reason....it makes everyone in the server faster...O_O
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:13.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode