01.06.2015, 18:59
Hey there.
I'm working on a new weapon system at the moment, where I'm using custom weapon names for each weapon. So I for example use Desert Eagle three times with three different weapon names and weapon damages.
Issue is, how can I define the custom names and item IDs?
This is something I made really quick, but I assume it won't work:
Would this work? If not, how can I make a weapon system like this?
Please help me out with this, and I'll do anything in return.
Thanks a lot in advance.
I'm working on a new weapon system at the moment, where I'm using custom weapon names for each weapon. So I for example use Desert Eagle three times with three different weapon names and weapon damages.
Issue is, how can I define the custom names and item IDs?
This is something I made really quick, but I assume it won't work:
Код:
enum InventoryItems { InvName[32], InvItem }; static const InvItems[][InventoryItems] = { // Desert Eagle (24) {"Beretta 92", 1000}, {"SIG P226", 1001}, {"Walther P5", 1002}, // M4 (31) {"M4A1", 1003}, {"Barrett REC7", 1004}, // MP5 (29) {"AMP-69", 1005}, {"MAS-38", 1006} }; stock DefineGuns(playerid) { if(Player[playerid][pWeapon] == "1001") { new string[128]; format(string, sizeof(string), "Your weapon name: %s", InvItems[0001]); SendClientMessage(playerid, COLOR_WHITE, string); } }
Please help me out with this, and I'll do anything in return.
Thanks a lot in advance.