GetWeaponNameEx
#1

Hi,

Код:
stock GetWeaponNameEx(weaponid, weapon[], len = sizeof(weapon))
{
    switch(weaponid)
    {
        case 18: strcat(weapon, "Molotov Cocktail", len);
        case 44: strcat(weapon, "Night Vision Goggles", len);
        case 45:  strcat(weapon, "Thermal Goggles", len);
        default: GetWeaponName(weaponid, weapon, len);
    }
    return weapon
}
It can return string?
Reply
#2

GetWeaponName(weaponid, const weapon[], len)

weaponid: The ID of the weapon to get the name of.
const weapon[]: An array to store the weapon's name in, passed by reference.
len :The maximum length of the weapon name to store. Should be sizeof(name).

use this
Reply
#3

Quote:
Originally Posted by ScIrUsna
Посмотреть сообщение
Hi,

Код:
stock GetWeaponNameEx(weaponid, weapon[], len = sizeof(weapon))
{
    switch(weaponid)
    {
        case 18: strcat(weapon, "Molotov Cocktail", len);
        case 44: strcat(weapon, "Night Vision Goggles", len);
        case 45:  strcat(weapon, "Thermal Goggles", len);
        default: GetWeaponName(weaponid, weapon, len);
    }
    return weapon
}
It can return string?
Yes, it does return the string formatted accordingly to what weaponid you input to the function.
Reply
#4

try this
PHP код:
stock GetWeaponNameEx(weaponidweapon[], len sizeof(weapon))
{
    switch(
weaponid)
    {
        case 
18weapon "Molotov Cocktail";
        case 
44weapon "Night Vision Goggles";
        case 
45weapon "Thermal Goggles";
        default: 
GetWeaponName(weaponidweaponlen);
    }
    return 
weapon;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)