Jump to content

DeadReacen

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by DeadReacen

  1. Hello gentlemen, I hope you are having a nice week, Well I am having a problem to see if you can help me solve it, I will thank you very much. I am going to explain how it works, when picking up a box the user has to make a delivery and from there it generates money, but what happens, it only gives me the xp, but not the money, do you have any idea how to solve this ?. Bad argument @ "givePlayerMoney" [Expected number at argument 2, git nill] function createEnd() local money = math.random(1,#Entregas) local x,y,z = unpack(Entregas[money]) MarkerEntrega = exports["x"]:createMarker("padrao2", Vector3 {x, y, z-0.9}) addEventHandler("onClientMarkerHit", MarkerEntrega, function(hitElement) if hitElement == localPlayer then local veh = getPedOccupiedVehicle(localPlayer) if veh and getElementModel(veh) == 530 then local box = getElementData(veh, "dock.Caixa") if box and serviceActive then --local money = math.random(200, 290) local money = math.random(money1, money2) local exp = math.random(exp1, exp2) givePlayerMoney(localPlayer, money) triggerServerEvent("dock.removeCaixa", localPlayer, localPlayer) triggerServerEvent("GiveExp", localPlayer, localPlayer, exp) notifyC("x $ "..formatNumber(money)..",00.", "success") notifyC("x", "info") if getBoxCount() < 1 then generateBoxes() end destroyElement(source) else notifyC("x", 'error') end end end end) end
  2. I will be aware of that, for now the code is not throwing me any errors but I will do my best to improve it, I thank you for everything.
  3. Thank you very much for everything you have a lot of skill. It is a work system, box table, it is the last function of the work itself. works if meat = box, The meat is turned into a box, it is a work role.
  4. I can't believe it for hours trying to fix it and I couldn't, Thank you very much and what you told me I'll take into account. Fixed issue Close Post
  5. function cancel(source) local emprego = getElementData(source, "Emprego") if emprego == "Carnicero" then if isKeyBound(source, "fire", "down", cortarCarne) then hits[source] = nil tick[source] = nil removeEventHandler("onElementClicked", caixa[source], onClick) removeEventHandler("onPlayerQuit", source, reset) removeEventHandler("onPlayerWasted", source, reset) if isElement(carne[source]) then destroyElement(carne[source]) carne[source] = nil end if isElement(caixa[source]) then destroyElement(caixa[source]) caixa[source] = nil end if isTimer(timerEsteira[source]) then killTimer(timerEsteira[source]) timerEsteira[source] = nil end if isTimer(timerEntregar[source]) then killTimer(timerEntregar[source]) timerEntregar[source] = nil end toggleAllControls(source, true) unbindKey(source, "fire", "down", cortarCarne) setPedAnimation(source, "CARRY", "liftup", 0.0, false, false, false, false) setElementVisibleTo(empacotar, source, false) setElementVisibleTo(entregar, source, false) end end end addCommandHandler("cancelar", cancel) Do you have any idea why I get this waring, and how to solve it? Thank you very much gentlemen WARNING: Bad argument @ 'removeEventHandler' [Expected element at argument 2, got nil]
  6. Hello gentlemen, everything okay?, My problem here is I can't remove the warning from the debug script function Cavar(playerSource) if not isPedInVehicle(playerSource) then local Emprego = getElementData(playerSource, "Emprego") or "Desempregado" if Emprego == "Albañil" then if not isElement(saco[playerSource]) then if getPedWeapon(playerSource) == 6 then setTimer(function() end, 11300, 1) else end end end end end addEventHandler("onMarkerHit", cavar, Cavar) --For scripter safety I had to delete lines WARNING: server.lua:48: Bad argument @ 'isPedInVehicle' [Expected ped at argument 1, got vehicle] if not playerSource then return end if isPedInVehicle(playerSource) then --use these functions but they don't work The truth is I did everything to try but something else does not occur to me. I hope you have an idea, I will thank you with all my heart
  7. Hello everyone is not because it is this error Please help with this, I can not fix addon_GlobalChaT\chat_server.lua:9: Bad argument @ 'call' [Expected string at argument 2, got none] function addAddonInfo ( name, description ) return call ( getResourceFromName( "DayZ" )) end addAddonInfo ( "GlobalChat", "" ) -------------------------------------------------------------------- What do I have to do Thank you thank you very much comrades
×
×
  • Create New...