SA-MP Forums Archive
Weapon Name - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weapon Name (/showthread.php?tid=599276)



Weapon Name - Squirrel - 23.01.2016

The problem is quite simple, its not displaying the weapon name

PHP код:
new weapons[13][2], string[128],gunname[32];
    for(new 
013i++)
    {
        new 
fstr[24];
        
GetPlayerWeaponData(otherplayeriweapons[i][0], weapons[i][1]);
        if(
weapons[i][0])
        {
            
format(fstrsizeof(fstr), "Slot %i: %s\n"iGetWeaponName(weapons[i][0],gunname,sizeof(gunname)));
            
            
Msg(playerid,COLOR_RED,fstr);
        }
    } 



Re: Weapon Name - Lumineux - 23.01.2016

Код:
new weapons[13][2], string[128],gunname[32]; 
    for(new i = 0; i < 13; i++) 
    { 
        new fstr[24]; 
        GetPlayerWeaponData(otherplayer, i, weapons[i][0], weapons[i][1]); 
        GetWeaponName(weapons[i][0],gunname,sizeof(gunname))
        if(weapons[i][0]) 
        { 
            format(fstr, sizeof(fstr), "Slot %i: %s\n", i, gunname); 
             
            Msg(playerid,COLOR_RED,fstr); 
        } 
    }