..:D&G:.. Posted February 17, 2014 Share Posted February 17, 2014 Hello, I want to get how to get the model ID of a pickup, like for the INFO pickup the model ID is 1239. Link to comment
Bonsai Posted February 17, 2014 Share Posted February 17, 2014 I guess you could just go to the Map Editor and check the pickup category. Select one and press F3. Link to comment
..:D&G:.. Posted February 17, 2014 Author Share Posted February 17, 2014 No.. I want to know a function or something to GET the ID, and put it in another function, like createPickup = ( x, y, z, type, MODEL....) And I want to get the model ID so I can put it in MODEL What I want to do is a command where you can make pickups, something like /addpickup [model] [message] I done everything, but I want to know how to get the model, like a house pickup, or info, so I can make a local like local dimension = getElementDimension Link to comment
50p Posted February 17, 2014 Share Posted February 17, 2014 Doesn't getElementModel return its model? Link to comment
..:D&G:.. Posted February 18, 2014 Author Share Posted February 18, 2014 Can't I do like a table where I can use the command like this: SYNTAXA: /addpickup [model] [message] /addpickup house This is a house pickup And the table to look something like this: local models = { house = PICKUP ID info = PICKUP ID dead = PICKUP ID friends = PICKUP ID bluehouse = PICKUP ID arrow = PICKUP ID } I am not really good at tables and getting the data from one. What I want to do is to put the word instead of the ID in the command and to put in the mysql database the ID of the pickup. In other words I want to use words in command and numbers (IDs) in database Link to comment
Moderators Citizen Posted February 18, 2014 Moderators Share Posted February 18, 2014 Yeah, just do what Bonsai just said or check that list from samp wiki: http://wiki.sa-mp.com/wiki/Pickup_IDs Link to comment
..:D&G:.. Posted February 18, 2014 Author Share Posted February 18, 2014 Sorry, but you lot don't get it.. I don't need the IDs, I want to know how to use a word in the cmd and numbers in the DB. For exaple in the command I wirte /cmd house, and in the mysql database I want it to be a number (that I put in the table) local models ={ casav = 1273 casaa = 1272 sacbani = 1212 inima = 1240 armura = 1242 info = 1239 dolar = 1247 pastila = 1241 stea = 1247 gta3 = 1248 bomba = 1252 camera = 1253 craniu = 1254 bani = 1274 bluza = 1275 disk = 1277 craniu2 = 1313 statue = 1276 parasuta = 1310 sageata = 1318 drog = 1279 } So, from this table I want to use the words instead othe PICKUP IDs, E.G. /cmdcreate gta3. All the pickups for me save in a mysql database, so in the DB i won't want to have the word, but I want the ID, which I've put on the table, but I don't know how to do this! How to use the word in the cmd and save in the DB as the ID ^ Link to comment
Castillo Posted February 18, 2014 Share Posted February 18, 2014 addCommandHandler ( "model", function ( thePlayer, _, name ) if ( models [ name ] ) then outputChatBox ( "The model for: ".. name .." is: ".. models [ name ], thePlayer ) end end ) Write "/model gta3" and it should output it's model. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now