I made a primary, secondary and melee system for my script so you can only have three weapons at a time. For /stats, I want it to be listed. For example:
Primary weapon: [Name], Secondary weapon: [Name], Melee: [Name].
This is what I've tried so far and it's been a complete failure.
OR
Neither work and I'm sort of stuck. Appreciate any help.
Primary weapon: [Name], Secondary weapon: [Name], Melee: [Name].
This is what I've tried so far and it's been a complete failure.
Code:
if(Player[playerid][WepSlot1])
{
new gunname;
GetWeaponName(Player[playerid][WepSlot1], gunname, sizeof(gunname));
format(Slot1, sizeof(Slot1), "%s", gunname);
}
else
{
format(Slot1, sizeof(Slot1), "None");
}
format(string, sizeof(string), "Primary weapon:[%s]", slot1);
Code:
if(Player[playerid][WepSlot1])
{
format(Slot1, sizeof(Slot1), "%s", GetWeaponName(Player[playerid][WepSlot1]);
}
else
{
format(Slot1, sizeof(Slot1), "None");
}