Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About AlexMiller

  • Rank
  1. It is "Which". Isn't that Valhalla gaming one?
  2. HI everyone, it's about 2 months that i'm trying to understand what i did wrong in the following script, that would give a player the weapons he had when lastly logged. Here is a part of the script, check if is there any weap on each slot, in this case, the number 5: if not (isGuestAccount (getPlayerAccount (source))) then paccount = getPlayerAccount (source) if (paccount) then slot5 = getPedWeapon (source, 5) slot5a = getPedTotalAmmo (source, 5) setAccountData (paccount, "rpg-slot5", slot5) setAccountData (paccount, "rpg-slot5Ammo", slot5a) end end
  3. Alright, it works, but I did this: function( upgrades, colors, paintjob ) local player = getVehicleOccupant( source ) local actupgrds = getAccountData( getPlayerAccount( player ), "carupg") local str = ""; for i, id in pairs( upgrades ) do str = str .. tostring( id ) .. ","; end str = str:sub( 1, -2 ) local str = actupgrds.. "," .. tostring(str) setAccountData( getPlayerAccount( player ), "carupg", str ) setAccountData( getPlayerAccount( player ), "paintjob", paintjob ) end) Thanks 50p
  4. Mmm, i have another problem. If the player has a vehicle tuned with exhausts ( f.e. ID: 1020) and roof ( 1027 ), and goes to the modhsop to get a spoiler ( 1040 ). The table that was 1020,1027 will became 1040 and not 1020,1027 and 1040. What shall I do?
  5. Yes but... How to add a loop that looks first at the first terms before the comma and adds the upgrade, second at the second one, etc... ? By splitting I still don't know how to continue... EDIT: I managed to, thanks!
  6. Thanks again for the answer. After putting that I finally receive a correct result! Now the problem is, how do you think that I can retrieve only the ID number without comma, and then adding it singularly to a car?
  7. Alright, thanks 50p for answering me. I'm trying to modify your resource a little, just to save the upgrades made by the shop on another DB, where my char datas are saved. Then, to save everything as a string, I just have to do to following?: stringupgrades = tostring( upgrades ) setAccountData(getPlayerAccount(source, "carupgrs",stringupgrades)) EDIT: I tried to, and I got no error during the server run, but by having a look in the char table I can see this where there should be upgrade IDs: table: 03DF45B8
  8. Hi there. I have a variable containing all upgrades that the modshop is going to put in my car ( "upgrades" ) and I wanted them to be saved in another DB, in only 1 row (like "1001,1002,1003). Is it possible to?
  9. There was the problem, thanks you now it properly works!
  10. Can anyone help me out with this?
  11. Alright. That 2 ouputchatboxs were written to check if the variables were wroking fine. function PayDay(plr, givepay) local reincome = 200 local account = getPlayerAccount (plr) local findcar = tonumber(getAccountData (account, "car")) if findcar ~= 481 then local itscost = tonumber(getAccountData (account, "carcost")) outputChatBox("cost is " ..itscost) outputChatBox("car is " ..findcar) local tax2 = itscost/1000 else local tax2 = "0" end local whatisgiven = reincome - tax2 local playerList = getElementsByType("player") for key,val in ipairs(playersList) do givePlayerMoney(val, what
  12. I'm using it locally, in the same script, in the same function.
  13. Hi there. I'm ahving some problems with my payday script. It gets the cost of the car a player has and divides it for 1000 to get the tax you have to pay for owning it. The problem is that when i try to perform this arithmetic: local tax2 = itscost /1000 I get this error: I have already checked if itscost is true by using some outputchatbox and printing it. It shows the car cost correctly. Thanks for helping!
  14. Thank you both R3mp and subenji99, now everything its ok. My panel properly works now. If anyone wants me to post here my Vehicle panel working, just ask me.
  • Create New...