Raised This Month: $ Target: $400
 0% 

restricting weapons


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 


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 16:47.


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