AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   restricting weapons (https://forums.alliedmods.net/showthread.php?t=13449)

faluco 05-16-2005 15:43

restricting weapons
 
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 05-17-2005 16:18

any one? :roll:

nightscreem 05-17-2005 16:34

just use one that already been made and change some in there codes

faluco 05-17-2005 16:51

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?


All times are GMT -4. The time now is 16:47.

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