Thread: #define problem
View Single Post
raydan
Senior Member
Join Date: Aug 2006
Old 12-07-2007 , 04:24   Re: #define problem
Reply With Quote #3

Quote:
Originally Posted by lamdacore View Post
you have to fill an array with the weapon strings, too. Now you can string compare these with the weapon you will get from GetEventString().

Code:
decl String:gWeaponStr[MAX_WEAPON][32];
strcopy(gWeaponSt[mg42], 32, "mg42");
 
if (!strcmp(weapon, gWeaponSt[mg42], 32)
{
  PrintToServer("%f",gWeaponKnockBack[mg42]);
}

it need to use many "if" to compare
raydan is offline