Raised This Month: $51 Target: $400
 12% 

amx_forceuse


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Brad (55)
coldkillerlips
Junior Member
Join Date: May 2006
Old 05-28-2006 , 04:02   amx_forceuse
Reply With Quote #1

I used the search button and didn't find anything. If this plugin has already been posted moderator please delete it.

Description: This plugin is used to Forceuse entities. Tested with AMXX 1.71, AMXX 1.01 and AMXX 1.75a

For example: Lets say your playing TSRP and you as admin don't have a key to a door, you just have to type amx_forceuse in the console and boom it's opened.

I haven't tested it too much so tell me if there is any bugs and i'll try to fix it. This is my first plugin so it's REALLY REALLY simple.

If you have any suggestions on clean up or easier ways to do this please tell me.

Code:
commands:
say /forceuse - Forceuse an entity.
amx_forceuse - Same as above.
amx_forceuse_toggleaccess <playername> - Add or remove access to command.
amx_forceuse_checkaccess <playername> - Change access to command.
If you need anything clarified tell me.

Credits:
Some methods taken from Harbu's plugins.
Silencer for added commands and code fixes.

Updated To Use cmd_access to check for ADMIN_BAN, and also added command say /forceuse and also uses is_valid_ent someone tell me if i did that right.

Updated by Silencer to use proper cmd_access and added commands amx_forceuse_checkaccess and amx_forceuse_toggleaccess. Silencer has been added to the credits.
[/list]
Attached Files
File Type: sma Get Plugin or Get Source (amx_forceuse.sma - 2421 views - 3.2 KB)
__________________

Last edited by coldkillerlips; 07-29-2006 at 15:23.
coldkillerlips is offline
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-28-2006 , 06:23  
Reply With Quote #2

GRR i was about to make this plugin
Make a say command
register_clcmd("say /forceuse",etc)

EDIT: Actually naw cause u can just bind something to that...god im slow
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-28-2006 , 09:45  
Reply With Quote #3

This can throw errors as you didn't check if the target is a counting number.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
VEN
Veteran Member
Join Date: Jan 2005
Old 05-28-2006 , 11:48  
Reply With Quote #4

You should use cmd_access function from amxmisc.inc to check whether the person who executed the command has required access level.
VEN is offline
coldkillerlips
Junior Member
Join Date: May 2006
Old 05-28-2006 , 16:29  
Reply With Quote #5

Quote:
Originally Posted by Hawk552
This can throw errors as you didn't check if the target is a counting number.
Any Suggestions on what to use to check the target?
__________________
coldkillerlips is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-28-2006 , 20:23  
Reply With Quote #6

Quote:
Originally Posted by coldkillerlips
Quote:
Originally Posted by Hawk552
This can throw errors as you didn't check if the target is a counting number.
Any Suggestions on what to use to check the target?
is_valid_ent
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
coldkillerlips
Junior Member
Join Date: May 2006
Old 05-28-2006 , 23:43  
Reply With Quote #7

Quote:
Originally Posted by Hawk552
Quote:
Originally Posted by coldkillerlips
Quote:
Originally Posted by Hawk552
This can throw errors as you didn't check if the target is a counting number.
Any Suggestions on what to use to check the target?
is_valid_ent
Ok i updated it i'm pretty sure i did that right but just in case i need someone elses opinion.
__________________
coldkillerlips is offline
Smokey485
Senior Member
Join Date: Dec 2004
Location: Newt 'Ellin
Old 05-29-2006 , 02:04  
Reply With Quote #8

you dont have to use this in your code

Code:
#include <fun>
__________________
+karma if I am helpful to you.
I am one in a few million.
Smokey485 is offline
Send a message via AIM to Smokey485 Send a message via MSN to Smokey485
coldkillerlips
Junior Member
Join Date: May 2006
Old 05-29-2006 , 02:13  
Reply With Quote #9

sorry though i might have needed it i'll take it out.
EDIT: Done.
__________________
coldkillerlips is offline
Mockers
Member
Join Date: May 2006
Location: Australia
Old 05-29-2006 , 04:36  
Reply With Quote #10

yea need fun for get_user_aiming(id)...at least i think

EDIT: Nevermind...wrong again lollzerz
Mockers is offline
Send a message via AIM to Mockers Send a message via MSN to Mockers
Reply



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 01:19.


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