Jump to content

Jalapeno

Members
  • Posts

    4
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Jalapeno's Achievements

Vic

Vic (3/54)

0

Reputation

  1. Hy, change this in the gun store server sided script file: addEvent( "BuyW", true) addEventHandler( "BuyW", getRootElement(), function ( tPM , gWA, wID ) local PlayerMoney = getPlayerMoney(source) if PlayerMoney >= tPM then giveWeapon (source, wID, gWA ) takePlayerMoney(source, tPM) setPedWeaponSlot(source, getSlotFromWeapon(tonumber(wID))) outputChatBox ( "#FFFF1A*** You Bought Weapon By : "..tonumber(tPM).."$ ***", source, 255, 0, 0, true ) else outputChatBox("you don't have $"..tonumber(tPM).." to buy This Weapon !", source, 255, 0, 0) end end) to this: addEvent( "BuyW", true) addEventHandler( "BuyW", getRootElement(), function ( tPM , gWA, wID ) local data = getElementData(source, "moneycoins"); thePoints = tonumber(data); if thePoints >= tPM then giveWeapon (source, wID, gWA ) setElementData(source, "moneycoins", data-tPM) setPedWeaponSlot(source, getSlotFromWeapon(tonumber(wID))) outputChatBox ( "#FFFF1A*** You Bought Weapon By : "..tonumber(tPM).."$ ***", source, 255, 0, 0, true ) else outputChatBox("you don't have $"..tonumber(tPM).." to buy This Weapon !", source, 255, 0, 0) end end)
  2. Give it a try , i woudl like to see the end of this project ,how is gonna look like.
  3. --Row 76 function GetLastDBID() local dbMuv = dbQuery( handler, "SELECT * FROM rust_items ORDER BY `id` DESC" ) local result = dbPoll(dbMuv, -1) if (#result>0) then for _, row in ipairs ( result ) do id = tonumber(row["id"]) return id break end end end addEvent("GetLastDBID", true) addEventHandler("GetLastDBID", root, GetLastDBID) --Row90 Hy guys, i have a little problem with this code, i wan't to get the last item id from my sql table but something doesen't work.... DebugScript: ERROR: Loading script failed: Inventory\codeS.lua:84 'end' expected (to close 'for' at line 81) near 'break'
×
×
  • Create New...