Skip to content

Add new funcs to y_weapondata - #644

Open
DEntis-T wants to merge 3 commits into
pawn-lang:5.xfrom
bracesoftware:5.x
Open

Add new funcs to y_weapondata#644
DEntis-T wants to merge 3 commits into
pawn-lang:5.xfrom
bracesoftware:5.x

Conversation

@DEntis-T

@DEntis-T DEntis-T commented May 3, 2023

Copy link
Copy Markdown
Contributor

No description provided.

@DEntis-T

DEntis-T commented May 3, 2023

Copy link
Copy Markdown
Contributor Author

@Y-Less Reopened the PR again.

@Jedrzej94

Copy link
Copy Markdown

@DEntis-T , do you mind adding this to your fork and rebase it with master?

static stock YSI_g_WeaponIconsNames[47][32] =
{
	"hud:fist",
	"brassknuckle:BRASSKNUCKLEicon", // doesn't display, SA-MP's internal limit to create in textdraw
	"golfclub:golfclubicon",
	"nitestick:nitestickicon",
	"knifecur:knifecuricon",
	"bat:baticon",
	"shovel:shovelicon",
	"poolcue:poolcueicon",
	"katana:katanaicon",
	"chnsaw:chnsawicon",
	"gun_dildo1:gun_dildo1icon",
	"gun_dildo2:gun_dildo2icon",
	"gun_vibe1:gun_vibe1icon",
	"gun_vibe2:gun_vibe2icon",
	"flower:flowericon",
	"gun_cane:gun_caneicon",
	"grenade:grenadeicon",
	"TearGas:TearGasicon",
	"molotov:molotovicon",
	"colt45:colt45icon",
	"silenced:silencedicon",
	"desert_eagle:desert_eagleicon", // doesn't display, SA-MP's internal limit to create in textdraw
	"chromegun:chromegunicon",
	"shotgspa:shotgspaicon",
	"sawnoff:sawnofficon",
	"micro_uzi:micro_uziicon",
	"mp5lng:mp5lngicon",
	"ak47:ak47icon",
	"M4:M4icon",
	"tec9:tec9icon",
	"cuntgun:cuntgunicon",
	"SNIPER:SNIPERicon",
	"rocketla:rocketlaicon",
	"heatseek:heatseekicon",
	"flame:flameicon",
	"minigun:minigunicon",
	"satchel:satchelicon",
	"bomb:bombicon",
	"SPRAYCAN:SPRAYCANicon",
	"fire_ex:fire_exicon",
	"camera:Cameraicon",
	"nvgoggles:nvgogglesicon",
	"irgoggles:irgogglesicon",
	"gun_para:gun_paraIcon"
};

stock bool:Weapon_GetTxdIconName(weaponid, dest[], size = sizeof (dest))
{
    dest[0] = '\0';
    if ((weaponid >= 0 && weaponid <= 18 || weaponid >= 22 && weaponid <= 46))
    {
        strcat(dest, YSI_g_WeaponIconsNames[weaponid], size);
        return true;
    }
    return false;
}

@Y-Less , when are you going to merge this pull request?

@DEntis-T

Copy link
Copy Markdown
Contributor Author

This can be merged.

@DEntis-T

Copy link
Copy Markdown
Contributor Author

@DEntis-T , do you mind adding this to your fork and rebase it with master?

static stock YSI_g_WeaponIconsNames[47][32] =
{
	"hud:fist",
	"brassknuckle:BRASSKNUCKLEicon", // doesn't display, SA-MP's internal limit to create in textdraw
	"golfclub:golfclubicon",
	"nitestick:nitestickicon",
	"knifecur:knifecuricon",
	"bat:baticon",
	"shovel:shovelicon",
	"poolcue:poolcueicon",
	"katana:katanaicon",
	"chnsaw:chnsawicon",
	"gun_dildo1:gun_dildo1icon",
	"gun_dildo2:gun_dildo2icon",
	"gun_vibe1:gun_vibe1icon",
	"gun_vibe2:gun_vibe2icon",
	"flower:flowericon",
	"gun_cane:gun_caneicon",
	"grenade:grenadeicon",
	"TearGas:TearGasicon",
	"molotov:molotovicon",
	"colt45:colt45icon",
	"silenced:silencedicon",
	"desert_eagle:desert_eagleicon", // doesn't display, SA-MP's internal limit to create in textdraw
	"chromegun:chromegunicon",
	"shotgspa:shotgspaicon",
	"sawnoff:sawnofficon",
	"micro_uzi:micro_uziicon",
	"mp5lng:mp5lngicon",
	"ak47:ak47icon",
	"M4:M4icon",
	"tec9:tec9icon",
	"cuntgun:cuntgunicon",
	"SNIPER:SNIPERicon",
	"rocketla:rocketlaicon",
	"heatseek:heatseekicon",
	"flame:flameicon",
	"minigun:minigunicon",
	"satchel:satchelicon",
	"bomb:bombicon",
	"SPRAYCAN:SPRAYCANicon",
	"fire_ex:fire_exicon",
	"camera:Cameraicon",
	"nvgoggles:nvgogglesicon",
	"irgoggles:irgogglesicon",
	"gun_para:gun_paraIcon"
};

stock bool:Weapon_GetTxdIconName(weaponid, dest[], size = sizeof (dest))
{
    dest[0] = '\0';
    if ((weaponid >= 0 && weaponid <= 18 || weaponid >= 22 && weaponid <= 46))
    {
        strcat(dest, YSI_g_WeaponIconsNames[weaponid], size);
        return true;
    }
    return false;
}

@Y-Less , when are you going to merge this pull request?

Done.

Comment thread YSI_Game/y_weapondata/y_weapondata_entry.inc Outdated
Comment thread YSI_Game/y_weapondata/y_weapondata_entry.inc Outdated
Comment thread YSI_Game/y_weapondata/y_weapondata_entry.inc Outdated
Comment thread YSI_Game/y_weapondata/y_weapondata_entry.inc Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants