Thread: Weap Restrist
View Single Post
MagicShot
Senior Member
Join Date: Mar 2004
Location: MN
Old 03-19-2004 , 13:17  
Reply With Quote #19

Quote:
Originally Posted by _KaszpiR_
see this nearline 47
Code:
    for (i=0; i<=32; i++) {

and see this near line 11
Code:
new weaponname[29][] = {"usp", "glock", "deagle", "p228" , "elites" , "fiveseven" , "pistols" , "pump" , "auto" , "shotguns" , "mac10" , "ump45" , "mp5" , "tmp", "p90" , "submachinegun" , "ak47" , "sg552" , "colt" , "aug" , "scout" , "awp" , "g3sniper" , "sgsniper" , "zoomed" , "scoped", "zoomscope" , "rifles" , "para"}

you are riding out of the array size, the i should be max 29 (sorta... )

thats why i suggest using while ( ) statement
How Does this Look? Above was edited with this also..
Does anyone see anythinf else?

Code:
weapname() {     new i = 0     while (i++ < 29) {         if (weaponname[i][0] == weap) {             curweap = i             return PLUGIN_CONTINUE         }     }     return PLUGIN_CONTINUE }
__________________
|v|agic$hot
.
Without a Sound
MagicShot is offline
Send a message via MSN to MagicShot Send a message via Yahoo to MagicShot