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

Weap Restrist


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-12-2004 , 21:28   Weap Restrist
Reply With Quote #1

I need some help I am working on a rewrite of my weap script that was like 5500 lines coded out.. I knew I could shorten it..

Thanx to Bailopan's Guildence I begun at work a few mins ago....

I was wondering will this work?

Code:
new max_weap_rest[35] new curweap[35] new weap_pend[35] new weap_disabled[35] new weap_msg[99] new weap_msg[usp] = "[AMX] Set Weapon USP Disabled Mode" new bool:first_time = false public checkweap(id,level,cid) {     new arg[32]     read_argv(1,arg,31)     weap = read_argv(1,arg,31)     if (!curweap[weap]) {         set_hudmessage(0, 100, 0, -1.0, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)         show_hudmessage(0,"Weapon Name Not Found!")         return PLUGIN_HANDLED     }     if(weap_disabled[weap] == 0) {         first_time = true         weap_pend[weap] = 1         client_print(id,print_console," weap_msg[weap] ")     }else {         weap_pend[weap] = 2         client_print(id,print_console," weap_msg[weap] ")     }     return PLUGIN_HANDLED }

Thanx Much...
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-13-2004 , 14:29   hmm
Reply With Quote #2

*bump .. anyone?
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 03-13-2004 , 18:56  
Reply With Quote #3

Code:
new weap_msg[99] 
new weap_msg[usp] = "[AMX] Set Weapon USP Disabled Mode"

Code:
client_print(id,print_console," weap_msg[weap] ")
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-13-2004 , 19:01  
Reply With Quote #4

Quote:
Originally Posted by SidLuke
Code:
new weap_msg[99] 
new weap_msg[usp] = "[AMX] Set Weapon USP Disabled Mode"

Code:
client_print(id,print_console," weap_msg[weap] ")
weap_msg[usp] = messges for what restriction I am doing
weap = usp
weap_msg[weap] = deiplays message for weap
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 03-13-2004 , 19:07  
Reply With Quote #5

Quote:
Originally Posted by MagicShot
weap_msg[usp] = messges for what restriction I am doing
weap = usp
weap_msg[weap] = deiplays message for weap
I still don't get it ..
waep_msg[usp] - this field has message about USP ?
weap_msg[m4a1] - this field has message about M4A1 ?
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
SidLuke
Senior Member
Join Date: Mar 2004
Location: Poland, Chrzanow
Old 03-13-2004 , 19:11  
Reply With Quote #6

Code:
new weap_msg[99] 
new weap_msg[usp] = "[AMX] Set Weapon USP Disabled Mode"
should be
Code:
#define CSMAX_WEAPONS 30 + 1
#define MAX_MSGLEN 64
new weap_msg[CSMAX_WEAPONS][MAX_MSGLEN] 
new weap_msg[usp][] = "[AMX] Set Weapon USP Disabled Mode"
Code:
client_print(id,print_console," weap_msg[weap] ")
should be
Code:
client_print(id,print_console,"%s",weap_msg[weap] )
SidLuke is offline
Send a message via AIM to SidLuke Send a message via MSN to SidLuke
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-14-2004 , 14:48  
Reply With Quote #7

gogogogo magicshot (i have no idea what that stuff does or means LOL)
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-14-2004 , 15:40  
Reply With Quote #8

Thanx..

Quote:
Originally Posted by SidLuke
Quote:
Originally Posted by MagicShot
weap_msg[usp] = messges for what restriction I am doing
weap = usp
weap_msg[weap] = deiplays message for weap
I still don't get it ..
waep_msg[usp] - this field has message about USP ?
weap_msg[m4a1] - this field has message about M4A1 ?
waep_msg[usp] <- If that is = 1 it is enabled if 0 disasbled

weap_msg[weap] <- used to call usp where if curweapon is usp where weap = Curweapon player is holding

Make more sense?
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-14-2004 , 15:59   Hmm
Reply With Quote #9

Will this work?

Code:
#include <amxmodx> #include <amxmisc> #define CSMAX_WEAPONS 30 + 1 #define MAX_MSGLEN 64 new max_weap_rest[35] new curweap[35] new weap_pend[] = usp, deagle, elite, p228, fiveseven new weap_disabled[] = usp, deagle, elite, p228, fiveseven new weap_msg[CSMAX_WEAPONS][MAX_MSGLEN] new weap_msg[usp][] = "[AMX] Set Weapon USP Disabled Mode" new bool:first_time = false public checkweap(id,level,cid) { new arg[32] read_argv(1,arg,31) weap = read_argv(1,arg,31)     if (!curweap[weap]) {         set_hudmessage(0, 100, 0, -1.0, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)         show_hudmessage(0,"Weapon Name Not Found!")         return PLUGIN_HANDLED     }     if(weap_disabled[weap] == 0) {         first_time = true         weap_pend[weap] = 1         client_print(id,print_console,"%s",weap_msg[weap] )     }else {         weap_pend[weap] = 2         client_print(id,print_console,"%s",weap_msg[weap] )     }     return PLUGIN_HANDLED } public plugin_init() {     register_plugin("Weapon Vote and Restrict","0.1","MagicShot")     register_cvar("amx_weaponrest","1",0)     register_clcmd("amx_magrest","checkweap",ADMIN_LEVEL_H,"amx_magrest :  toggles restricted weapons eg. amx_magrest weaponname") }
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot
tnsk8er27
Senior Member
Join Date: Mar 2004
Location: richfield MN
Old 03-14-2004 , 16:19  
Reply With Quote #10

ahh i dont understand!!!!!!!!!!!!!!!!
__________________
Toxic
tnsk8er27 is offline
Send a message via AIM to tnsk8er27
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 15:35.


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