12.07.2012, 02:23
I would appreciate it if you told me what warnings you're getting. If you want just the stock, here:
pawn Код:
stock GetWeaponID(weaponName[], bool: ignoreCase = true, bool: useFind = false)
{
new weaponID = -1;
if(useFind == false)
{
for(new i = 0, sof = sizeof(svAddons_WeaponNames); i < sof; i++)
{
if(!strcmp(svAddons_WeaponNames[i], weaponName, ignoreCase))
{
weaponID = i;
break;
}
}
}
else if(useFind == true)
{
for(new i = 0, sof = sizeof(svAddons_WeaponNames); i < sof; i++)
{
if(strfind(svAddons_WeaponNames[i], weaponName, ignorecase) > -1)
{
weaponID = i;
break;
}
}
}
return weaponID;
}