Jump to content

Perfect

Members
  • Posts

    563
  • Joined

  • Last visited

Everything posted by Perfect

  1. Well, I wanted give player money from table named 'players' and then save back again in table players in column named 'money'.
  2. Oh well, Thank you, i guess i understand something but with little confusion. Can you Please tell me Where the table will create ? or it will create file.db in same resource and create table there ? How to create file.db ? and this will work ? if negative then why ? addEventHandler ( "onPlayerQuit", root, function () executeSQLQuery("SELECT money FROM players WHERE name=?", source) local nmoney = setPlayerMoney(source,players.money+100) executeSQLQuery("UPDATE players SET 'money' =? WHERE 'name'=?",nmoney,source) end)
  3. Hello, Recently I decided to learn SQLITE as i was running from it for many months. I don't know how to connect lua with SQLITE. Please tell me how to connect lua with SQLITE. And If you can Please provide a simple example like storing player money etc....
  4. Well, Script is still not working, Can You Please Help Me ? (BUMP)
  5. Perfect

    Ban reason

    Yeah, as some players do some :~ on servers and then get banned and get something similar to Short Time Memory Loss thing. Then after sometime they try to connect to the same server from which they had got banned and they are like 'lala lala lala lala" then they got message just saying "You are banned from this server". As a result their Brain Freeze!! Well, I completely agree with Drakath In Adding Ban Reason for whenever a banned player try to connect to the Server, From Which he had got Banned.
  6. Well, I think you want to change weapon ID to 0 but what you mean by "if write-through if you hit him and knock the server.lua attack me in the giveWeapon place?"
  7. Perfect

    The last reply

    Well, There Is Nothing Exist In Whole Universe As Some Thing Exist As Nothing.
  8. Explain it Briefly, If you really want to get some help.
  9. Oh, Thank you for the advice. But Script is still same.
  10. Oh well, So how should i change it in script. I don't have an idea of what should i change. Can You Please Guide Me Through It ?
  11. I don't know exactly what was the problem but i copy all files contents (including meta) and paste it into another file. I copy meta of my other resource and replace it with my scripts file. i put them in new zip file and through it on my [gamplay] folder, like miracle it started working. In Some Way, it happens because of you!! Thank You So Much! (i was suffering from that error for nearly past weak)
  12. Hello, I made a resource but when i start it, it gives me following error:- Error: Couldn't find script Script_s for resource [K]Script. Well They are my real script and resource names. I have 2 scripts one client and one server. but it gives error just for Script_s. Any Help Will Be Really Appreciate.
  13. That Magic code is same as previous ones. The Ped is rotating in circle but the circle's size is increasing and decreasing ( or ped is moving in different directions with rotating in circle)
  14. Well, I try your script, its better than the previous one. but ped is moving 1 step to southwards after 1-2 rounds of ratation. As i said, i want it to rotate same place. so after many hours, it should be rotating in same place without moving inch from the circle. Well, You already tried so much for me. Thank you for that. But can you tell me exactly what i should do, I am very weak in trigonometry and even more weak when trigonometry come to scripting. Can you please give me example of what i should do.(please wright steps in simple and plain english)
  15. Well, I think you didn't check the whole script. There is a timer too. addEventHandler( "onClientResourceStart",resourceRoot, function() setTimer(pedRotate,500,0) end)
  16. Perfect

    [Help]Tables

    I think understand something from that but don't know for sure. That is enough for now, i will practice it and make my understanding more clear. Thanks guys for helping and teaching me basics of tables. Special thanks to myonlake for spending(hope it isnt wasted) his time for me.
  17. Perfect

    [Help]Tables

    I think you have increased my confusing by not directly answering my question. Well, I was asking if i create myTable={[1]=true} and then make a following script. function someThing() if myTable[1] then ... end end It will replace myTable[1] with true (As assigned value) and all numbers will be allowed (not only 1) as there is 'if true then' did you understand ?
  18. Well, If you wait there(where ped was rotating) for few minutes, you will know Its not perfect. The Ped is Rotating but also moving like he was moving northwards with moving in circles. I want it to rotate in one place. Thank You So Much so far.
  19. Perfect

    [Help]Tables

    Hurray, i got that table.sort and '1 = true' thing but still why i have to use myTable = {[1] = true} If i use myTable= {1,2,3,4} then i call it as myTable[3] it should return '3'. Am I Correct ? And if I use, myTable={[1]=true} then when i call myTable[1], It should return 'true' then it will be something like function someThing() if true then -- as myTable[1] value is true. .... end end It is so confusing!
  20. Perfect

    [Help]Tables

    Oh yeah i got it, Thank You for your Petiance and for clearing some basic things about tables. But still whats the difference between weapons = {1,2,3} and weapons={[1] = true,[2]=true,[3]=true} 2) What happens if i replace 'true' with 'abcd' ,'false' ? 3) What really table.sort do ? how to use it ?(As i saw that thing in many functions)
  21. Perfect

    [Help]Tables

    so you mean i have to do this ? myValue = 2,3,4,5,6,7,8,9 Well, I don't understand a thing about tables except creating table and i am also not sure of it. From my understand, i create This :- weapons = { 2,3,4,5,6,7,8,9} function (attacker, weapon, bodypart, loss) if table.sort[#weapons] then ....... end end Can you Please tell me this will work or not ? and why not ?
  22. Perfect

    [Help]Tables

    Well, I don't understand the second one at all. but why you use myValue variable in first one ? I have to assign it value from zero to eight to make it work ?
  23. Uncle Bilal, Am I Bumping An Old Topic ?
  24. Perfect

    [Help]Tables

    Hello, Can some help me on making Tables for the following script ? function (attacker, weapon, bodypart, loss) if weapon == 2 or weapon == 3 or weapon == 4 or weapon == 5 or weapon == 6 or weapon == 7 or weapon == 8 or weapon == 9 then ....... end end Well, I am trying to make a table for all weapons in groups of slot 0 no weapons, slot 1 melee, slot 2 handguns ....etc You can find those weapons slots at :- https://wiki.multitheftauto.com/wiki/Weapon I always have difficulties in making tables, can someone Please teach me some basics ? f from creating tables to loading from tables ? (or just make a table for above script with loading facility and i will try to understand it.)
×
×
  • Create New...