Raised This Month: $ Target: $400
 0% 

restricting weapons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 05-16-2005 , 15:43   restricting weapons
Reply With Quote #1

hello, im trying to make a plugin for pistols only, or other onlys, but when i get to the most important part of the plugins, restricting, it doesnt work right, sometimes it restricts and then when i want to unrestrict with another vote it doesnt unrestrict, or the other way round. this is the code for when the votes finishes:
Code:
if (choice[0] > choice[1]) {             server_cmd("exec addons/amxmodx/configs/pistol.cfg");             /*server_cmd("amx_restrict on");             server_cmd("amx_restrict off pistol");             server_cmd("amx_restrict off equip");             server_cmd("amx_restrict off ammo");             server_cmd("amx_restrict save");*/             client_print(0, print_chat, "* Votacion Aprobada para Solo pistolas (si ^"%d^") (no ^"%d^"). *", choice[0], choice[1]);         }else{             server_cmd("exec addons/amxmodx/configs/allweapons.cfg");             /*server_cmd("amx_restrict off");             server_cmd("amx_restrict save");*/             client_print(0, print_chat, "* Todas las armas permitidas (si ^"%d^") (no ^"%d^"). *", choice[0], choice[1]);

i have tried using directly the amx_restrict in the plugin, or executing a cfg that contains the restrictions, but both didnt work well(the amx_restrict are commented because i was testing the other way)
so why restricting with this method doesnt work correctly?
faluco is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 05-17-2005 , 16:18  
Reply With Quote #2

any one?
faluco is offline
nightscreem
Veteran Member
Join Date: Jul 2004
Location: Belgium
Old 05-17-2005 , 16:34  
Reply With Quote #3

just use one that already been made and change some in there codes
__________________
- Bye bye!
nightscreem is offline
faluco
Developer
Join Date: Mar 2005
Location: Valencia, Spain
Old 05-17-2005 , 16:51  
Reply With Quote #4

i have looked into other plugins but they use the "drop weapon" and i dont want that, it makes you loose money. its very strange it doesnt work well, can be a bug in the restmenu plugin or the amx_restrict cant be used this way?
faluco is offline
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 16:47.


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