Thread: Weap Restrist
View Single Post
_KaszpiR_
AMX Mod X Beta Tester
Join Date: Feb 2004
Location: Warsaw, Poland
Old 03-16-2004 , 03:44  
Reply With Quote #12

MagicShot, as i said on irc
you may use
Code:
if(weap_disabled[weap])     {         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] ")     }
isntead of current code, a bit faster

also the weap_pend make a bool instead of int especially if it is a switch (or you may depcrecate the array and use a bitshifting)


also
09:40:26 (SniperBot) (MagicShot) when I do this
09:40:28 (SniperBot) (MagicShot) new weap_msg[CSMAX_WEAPONS][MAX_MSGLEN]
09:40:28 (SniperBot) (MagicShot) new weap_msg[usp][] = "[AMX] Set Weapon USP Disabled Mode"
09:409 (SniperBot) (MagicShot) it says weap_msg already defined


uou use new twice, the first with MAX values and the second you try to define array with a specified value
just remove the new in the second line and it should work

finally
decide if you use weap_msg["usp"] or weap_msg[usp]
as i understanded it on irc you want to parse a string so

but then the currweap is wrong anw the weap = read_argv is wrong
cause it should be at least
new weap[32]
read_argv(1,weap,31)
__________________
= Ave Cesar, morituri Te salutant. = http://nvt.prv.pl = http://hlds.pl/
_KaszpiR_ is offline