GhostXoP
Members-
Posts
402 -
Joined
-
Last visited
Everything posted by GhostXoP
-
What is the limit amount?
-
A limit?..... Are you kidding me?
-
They array being extracted from the account data, is nil with 14 without 14 the array is stored in the account data.
-
None, the array is sent if its just line 13. If i involve 14, it does not send. I know this because it will set the money to 25 without 14, but with 14 i get errors saying the array is nil (array wasnt sent) Ive tried sending as JSON strings, and regular arrays. Ive even sent and then used for and in pairs to merge all data. Its not getting stored
-
So i have figured out that the problem is when it gets to line 15. If i remove that, the data is saved, if i keep it the data is not. How is this happening, why is it not working? Edit: *Its when i add anything to the table after its been declared it doesn't get saved.
-
Up until i had added a weapon into the array, it appears this isn't being saved, in fact, it isnt keeping the user logged in like it has before. Before, i would set account data, but first get the account and it would appear as "logged in", but now, when i log out after account creation it says that the account wasn't logged in to begin with. I have a feeling i'm not getting the account / storing account data properly. function CreateClientAccount(Username, Password) if addAccount(Username,Password) == false then triggerClientEvent(source,"AccountCreationProgress", getRootElement(), false) return else --Set Player Stats local PlayerBriefCase = { Weapons = {}, Health = {}, Vehicles = {}, Buildings = {}, HealthStat = 100, MoneyStat = 25 } PlayerBriefCase.Weapons[22] = {ID = 22, Ammo = 5 } local account = getAccount(Username, Password) setAccountData(account, "Life.BriefCase", toJSON(PlayerBriefCase)) outputChatBox(account) --Number outputs, the player is usually considered logged in at this point, but for some reason it stopped doing this.. logOut(source) triggerClientEvent(source,"AccountCreationProgress", getRootElement(), true) return end end addEvent("AccountCreationAttempt", true) addEventHandler("AccountCreationAttempt", getRootElement(), CreateClientAccount) Is the function that deals with creation of default stats, then gives the user a pistol (My way) for when that user logs in again
-
Your fine, i know how to script
-
Which functions can i use to, get the players current weapon in hand, and what that weapon is and its ammo? getPedWeaponSlot for getting current weapon getPedWeapon getPedTotalAmmo?
-
Is there a way the client can give themselves a weapon, rather then asking the server to deliver one?
-
What i had wanted was a little difficult to explain.
-
I have fixed it
-
Maybe your not seeing what im getting at, but i thank you for trying. I want to be able to pass arrays into a function, and combine them with another array. But lets say one array is in another array and is indexed with the number 341, i want the function to put the array into another array, but still be able to access the sub array by doing array[341]. I want to put arrays into other arrays and keep their indexes. I know they are merging, but i still want to keep how you access them. So if you could access array[2].hey, using the function i want, you would get anotherarray[2].hey I want to keep the KEY VALUE.
-
I would do key,value in pairs BUT then i assume it would do Array[key].Var and i want the actual key, not the name being key.
-
I have re-edited my post for better understanding. I want to keep the number that indexes the subarray from the parent array, and when putting the subarray within another parent array, and be able to index it with the same number
-
Put that in function form. Take an array and keep its value that references it. You just did an assignment, but what if you don't know the reference name? That's my problem.
-
Lets say you have an array, which contains a sub array, which contains a variable. To get to the variable, you must do THEArray[386].Variable = "hello" Now, lets say you have a function, it takes an argument of an array and puts this array within another array. function ArrayCombiner(array,NEWsubarray) array[NEWsubarray] = NEWsubarray end this would put NEWsubarray within array. local tempArray If we did ArrayCombiner(tempArray,THEArray[386]) this would put 386 array within tempArray now my question is, how can i do this, merging values and keep the reference name of 386? if i do this, and then did print(tempArray[386].Variable) it doesnt exist. Ofcourse, i know this doesnt work. My point is to show you what i want to do, and figure out if there is a way of doing this, and keeping the name 386. so i can do tempArray[386].Variable
-
I have a table within an array. The array is pointed to through a number so array[386] = {array variables} Example. So lets say my function recieves an argument like function(array[386]) how would i place the argument While within the function, within another array but still be able to access it doing otherarray[386] = { array variables } I can rephrase if you don't understand what im getting at I ask because i assume otherarray[argument] = argument wont keep it so i can do otherarray[386] = original data
-
Hows Neo playgrounds doing? Its pretty obvious what i want. My question tells, does the execution return from the event handling function to line 6 or not. Edit: Lol your so mad that you even re-edited your post twice to try and get at me. This is great lol But thank you, i feel special that you did that for me. Ill begin workin on your medal
-
You have a logic problem, please re-do your 4 years at your local high school for entry logic lessons. At Line 5, you trigger an event, and the execution goes to another function that handles the trigger now what i dont know is, Within the virtual machine of lua is another process opened to execute the function of the triggered event, and continue on to line six? Or does it transfer execution onto the function handler, and when the handler is done, does it come back to line six and continue?
-
Say you have this 1 2 3 4 5 TriggerEvent 6 7 8 When the event is over, is line 6 interpreted next?
-
This whole time i was thinking it was AS, (the source to the element being receiving the event) Thank you. triggerEvent(EventString,ToElement, arguments)
-
Thats when i figured it had mean't the second parameter was the element it was triggering the event for. Am i right? Is this to show that its triggering AS the root element, or TO the root element?
-
the second parameter of triggerEvent is to represent the element triggering the event? Or who it pertains to? This entire time i was using getRootElement() until i read the CPU intensive bit, so now i assume it is the element it pertains to
-
https://wiki.multitheftauto.com/wiki/OnPickupHit Is what i was looking for then (Hadn't assumed to read the source) Thanks again
