Thread: #define problem
View Single Post
lamdacore
Member
Join Date: Aug 2005
Old 12-07-2007 , 02:26   Re: #define problem
Reply With Quote #2

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]);
}
lamdacore is offline