Scripts / weapon_name. How to compare?

Author
Message
MaximEpihin
User Deleted
Posted: 29th Jun 2015 23:51
I need to check for the name of the weapon.
found array weapon_name, which will return the name, but how to compare these names?
purpose: if weapon_name is "colt", it is possible to do something.
that is a test of weapon name to assign its value.
Create a game - it's like to start a new universe where there is only you and solitude with the environment
!nullptr
Forum Support
9
Years of Service
User Offline
Joined: 27th Mar 2015
Location: Australia
Posted: 30th Jun 2015 00:33
Not 100% sure of your question. Getting the name of the weapon is easy enough but why do you need to compare them? What are you trying to achieve? Change the displayed name? See what weapons you own?

weapon.lua shows how to access and display the weapon name, for more I'd need to know what you intend to do with it. It's easy enough to do a script to read in all the weapons into an array you manage - as long as you understand how to use and manage said array
AKA SisterMatic (Steam)
Development/ Gaming Rigs
Sys 1: i7-4770 (3.5)/16Gb/128 SSD/3Tb/970gtx/2 x 23, 1 x 27 LCD - Sys 2: i7/8Gb/670gtx/1.5Tb/1 x 23 LCD - Sys 3: Amd Quad/8Gb/645gtx/1Tb/30" LCD
PM
MaximEpihin
User Deleted
Posted: 30th Jun 2015 18:43
Quote: "Not 100% sure of your question. Getting the name of the weapon is easy enough but why do you need to compare them?"

I want to set own special price for each weapons. Weapon 1(colt) - 250, Weapon 2(magnum) - 500 etc
Create a game - it's like to start a new universe where there is only you and solitude with the environment
smallg
Community Leader
19
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 30th Jun 2015 19:23 Edited at: 30th Jun 2015 19:24
life\'s one big game

windows vista ultimate

i5 @3.3ghz, 4gb ram, geforce gtx460, directx 11
MaximEpihin
User Deleted
Posted: 30th Jun 2015 20:35
Quote: "if weapon_name[e] == "Colt 1911" then
end"

Thank, weapon_name[e] == basic name weapon as entity name
Create a game - it's like to start a new universe where there is only you and solitude with the environment

Login to post a reply

Server time is: 2024-12-22 01:18:25
Your offset time is: 2024-12-22 01:18:25