Is there anything wrong with this?
#1

PHP код:
stock returnWeaponName(weaponid)
{
    new 
szGunName[32];
    
GetWeaponName(weaponidszGunNamesizeof(szGunName));
    
    return 
szGunName;

When I try to use it, it doesn't return anything it just appear's blank?
Reply
#2

WTF ? I'm tested the function, i'ts work fine o.O

Are you sure that not inserted a invalid weapon id in the parameter "weaponid" of the function ?

See :
pawn Код:
stock returnWeaponName(weaponid)
{
    new szGunName[32];
    GetWeaponName(weaponid, szGunName, sizeof(szGunName));

    return szGunName;
}

public OnGameModeInit()
{
   
    printf("%s", returnWeaponName(24));
   
    return 1;
}
output :
Quote:

[01:33:38] Desert Eagle

i hope that helped you
Reply
#3

Nothing wrong with it from first observation. Show us an example of how you're using this function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)