Jump to content

OrbTanT

Members
  • Posts

    226
  • Joined

  • Last visited

Everything posted by OrbTanT

  1. Do I have to use isElement when I call the event "onClientMouseEnter" where are the elements or "onClientMouseLeave" which is where destroy the elements
  2. I created a skin shop, he is functioning normally, all functions, only I would like to know because it is experiencing these errors and as concert. error: WARNING: skin-shop/client.lua:64: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:65: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:69: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:70: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:74: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:75: Bad Argument @ 'destroyElement' WARNING: skin-shop/client.lua:54: Bad 'element' pointer @ 'destroyElement'(1) WARNING: skin-shop/client.lua:55: Bad 'element' pointer @ 'destroyElement'(1) WARNING: skin-shop/client.lua:59: Bad 'element' pointer @ 'destroyElement'(1) WARNING: skin-shop/client.lua:60: Bad 'element' pointer @ 'destroyElement'(1) client: GUIEditor = { button = {}, window = {} } function skinshop() GUIEditor.window[1] = guiCreateWindow(368, 105, 641, 549, "Skin", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 0.85) cesar = guiCreateButton(20, 35, 160, 46, "292", false, GUIEditor.window[1]) ogloc = guiCreateButton(20, 90, 160, 46, "293", false, GUIEditor.window[1]) boxhead = guiCreateButton(20, 145, 160, 46, "137", false, GUIEditor.window[1]) hooded = guiCreateButton(20, 200, 160, 46, "230", false, GUIEditor.window[1]) inbred = guiCreateButton(20, 255, 160, 46, "162", false, GUIEditor.window[1]) sair = guiCreateButton(20, 485, 160, 46, "Sair", false, GUIEditor.window[1]) function showimagem() if isCursorShowing() and (source == cesar or source == ogloc or source == boxhead or source == hooded or source == inbred ) then end end addEventHandler("onClientMouseEnter", getRootElement(), showimagem) function showCesar() a = guiCreateStaticImage(660, 150, 200, 450, "skin/1.png", false) valora = guiCreateLabel(750, 600, 100, 100, "$100.000", false) end addEventHandler("onClientMouseEnter", cesar, showCesar, false) function showogloc() b = guiCreateStaticImage(660, 150, 200, 450, "skin/2.png", false) valorb = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", ogloc, showogloc, false) function showboxhead() c = guiCreateStaticImage(660, 150, 200, 450, "skin/3.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", boxhead, showboxhead, false) function showhooded() d = guiCreateStaticImage(660, 150, 200, 450, "skin/4.png", false) valord = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", hooded, showhooded, false) function showinbred() e = guiCreateStaticImage(660, 150, 200, 450, "skin/5.png", false) valorc = guiCreateLabel(750, 600, 63, 17, "$100.000", false) end addEventHandler("onClientMouseEnter", inbred, showinbred, false) function showcesar1() destroyElement(a) destroyElement(valora) end addEventHandler("onClientMouseLeave", cesar, showcesar1) function showogloc1() destroyElement(b) destroyElement(valorb) end addEventHandler("onClientMouseLeave", ogloc, showogloc1) function showboxhead1() destroyElement(c) destroyElement(valorc) end addEventHandler("onClientMouseLeave", boxhead, showboxhead1) function showhooded1() destroyElement(d) destroyElement(valord) end addEventHandler("onClientMouseLeave", hooded, showhooded1) function showinbred1() destroyElement(e) destroyElement(valore) end addEventHandler("onClientMouseLeave", inbred, showinbred1) end addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == cesar ) then triggerServerEvent("cesar",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == ogloc ) then triggerServerEvent("ogloc",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == boxhead ) then triggerServerEvent("boxhead",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == hooded ) then triggerServerEvent("hooded",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == inbred ) then triggerServerEvent("inbred",getLocalPlayer()) end end ) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if ( source == sair ) then guiSetVisible(GUIEditor.window[1], false) showCursor(false) armsPlayer = nil end end ) addEventHandler( 'onClientResourceStart', resourceRoot, function( ) createskin( 217.44, -98.51, 1004.28, 15, 0 ) end ) function createskin( skinY, skinX, skinZ, skinInter, skinDim ) local skinMarker = createMarker( skinY, skinX, skinZ, 'cylinder', 1.3, 255, 0, 0, 180 ) setElementInterior( skinMarker, (skinInter or 0), skinY, skinX, skinZ ) setElementDimension( skinMarker, skinDim ) addEventHandler( 'onClientMarkerHit', skinMarker, function( hitPlayer, matchingDimension ) if( hitPlayer == localPlayer )and( matchingDimension )then if ( not isElement ( GUIEditor.window[1] ) ) then skinshop ( ) end guiSetVisible (GUIEditor.window[1], true) showCursor (true) end end ) end
  3. OrbTanT

    Bad Argument

    Now that is working, is presenting the following error, I can't solve because I do not know exactly where it is the cause of the problem, this error occurs when I was to return the profit to the DxDrawRectangle. erro: ERROR: propriedades\server.lua:16: attempt to perform arithmetic on a boolean value client: local x,y = guiGetScreenSize() setElementData(resourceRoot,"reaPreco",0) addEvent("reajustarPreco",true) addEventHandler("reajustarPreco",root, function(p) setElementData(resourceRoot,"reaPreco",p) end) local Text= "Nome: Come a lot" local Text2= "Lucro:" local Text3= "Dono:" addEventHandler("onClientRender",root, function() local Px,Py,Pz = getCameraMatrix( ) local x,y,z = 2181.8864746094,1115.2287597656,12.34375 local dis = getDistanceBetweenPoints3D(Px, Py, Pz, x, y, z) if dis <= 20 then local preco = getElementData(resourceRoot,"reaPreco") dxDrawRectangle ( 60, 320, 250, 175, tocolor(0, 0, 0, 175), false) dxDrawText ( "INFORMAÇÃO", 130, 330, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default-bold" ) dxDrawText ( Text, 80, 360, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( Text2, 80, 450, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( Text3, 80, 405, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( tostring(preco), 130, 450, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) end end) server: local infoz = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) local prop = createBlip(2181.8864746094,1115.2287597656,12.34375,31) addCommandHandler("comprar", function(player) local money = getPlayerMoney(player) local dono = getElementData(player,"donoCasa") if money == 200000 and dono ~= true then --- ~= siginifica diferente takePlayerMoney ( player, 200000 ) outputChatBox("Você comprou a propriedade Come a Lot",player) timer = setTimer ( function() setElementData(resourceRoot,"precoCasa",getElementData(resourceRoot,"precoCasa") + 25000) triggerClientEvent("reajustarPreco",resourceRoot,getElementData(resourceRoot,"precoCasa")) end, 60*1000, 0 ) setElementData(resourceRoot,"donoCasa",player) createBlip(2181.8864746094,1115.2287597656,12.34375,32) end end) addEventHandler("onPickupHit", infoz, function(player,dim) local dono = getElementData(resourceRoot,"donoCasa") if getElementType(player) == "player" and dim then if dono == false then outputChatBox("Não existe dono, você pode comprar esta casa",player) else outputChatBox("Você é o dono desta casa pode vende-la",player) end end end) addCommandHandler("lucrar", function(player) local dono = getElementData(resourceRoot,"donoCasa") if dono ~= false and dono == player then givePlayerMoney(player,Preco_casa1) if outputChatBox("Você recebeu " .. getElementData(resourceRoot,"precoCasa") .. " de lucro.",player) then setElementData(resourceRoot,"precoCasa",0) triggerClientEvent("reajustarPreco",root,getElementData(resourceRoot,"precoCasa")) end end end) addCommandHandler("vender", function(player) local dono = getElementData(resourceRoot,"donoCasa") if dono ~= false and dono == player then setElementData(resourceRoot,"timer",0) setElementData(resourceRoot,"precoCasa",0) killTimer( timer ) givePlayerMoney(player,200000) createBlip(2181.8864746094,1115.2287597656,12.34375,31) triggerClientEvent("reajustarPreco",root,Preco_casa1) outputChatBox("Você vendeu a propriedade Come a Lot",player) end end)
  4. OrbTanT

    Bad Argument

    Thank you is now working, error so easy to be solved and not realized =/
  5. OrbTanT

    Bad Argument

    Good,help me is occurring the following errors when trying to buy my property, I have tried to fix more still persists the error. error: WARNING: propriedades\server.lua:10: Bad argument @ 'getPlayerMoney' WARNING: propriedades\server.lua:11: Bad argument @ 'getElementData' [Expected element at argument 1, got nil] server- local infoz = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) local prop = createBlip(2181.8864746094,1115.2287597656,12.34375,31) addCommandHandler("comprar", function() local money = getPlayerMoney(player) local dono = getElementData(player,"donoCasa") if money == 200000 and dono ~= true then --- ~= siginifica diferente takePlayerMoney ( player, 200000 ) outputChatBox("Você comprou a propriedade Come a Lot",player) timer = setTimer ( function() setElementData(resourceRoot,"precoCasa",getElementData(resourceRoot,"precoCasa") + 25000) triggerClientEvent("reajustarPreco",resourceRoot,getElementData(resourceRoot,"precoCasa")) end, 60*1000, 0 ) setElementData(resourceRoot,"donoCasa",player) createBlip(2181.8864746094,1115.2287597656,12.34375,32) end end) addEventHandler("onPickupHit", infoz, function(player,dim) local dono = getElementData(resourceRoot,"donoCasa") if getElementType(player) == "player" and dim then if dono == false then outputChatBox("Não existe dono, você pode comprar esta casa",player) else outputChatBox("Você é o dono desta casa pode vende-la",player) end end end) addCommandHandler("lucrar", function(player) local dono = getElementData(resourceRoot,"donoCasa") if dono ~= false and dono == player then givePlayerMoney(player,Preco_casa1) if outputChatBox("Você recebeu " .. getElementData(resourceRoot,"precoCasa") .. " de lucro.",player) then setElementData(resourceRoot,"precoCasa",0) triggerClientEvent("reajustarPreco",root,getElementData(resourceRoot,"precoCasa")) end end end) addCommandHandler("vender", function(player) local dono = getElementData(resourceRoot,"donoCasa") if dono ~= false and dono == player then setElementData(resourceRoot,"timer",0) setElementData(resourceRoot,"precoCasa",0) killTimer( timer ) givePlayerMoney(player,200000) createBlip(2181.8864746094,1115.2287597656,12.34375,31) triggerClientEvent("reajustarPreco",root,Preco_casa1) outputChatBox("Você vendeu a propriedade Come a Lot",player) end end)
  6. How can I set to destroy the blips that are outside of the 250 in getDistanceBetweenPoints2D and recreate the blips again when re-enters the range of 250, I tried to and not work, at least does not work with the map of f11 ta full of blips addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() local localX, localY = getElementPosition(localPlayer) for _, blip in pairs(getElementsByType("blip")) do local blipX, blipY = getElementPosition(blip) if(getDistanceBetweenPoints2D(localX, localY, blipX, blipY) > 250) then setBlipVisibleDistance(blip, 500) destroyElement ( blip ) end end end, 500, 0) end)
  7. Yes more I can't think of a way to use setBlipVisibleDistance, to work on a map of f11 and for all the blips
  8. I am putting a script to show the blips, both on the map of the f11 as well as in radar, to only show the blips that are 250 away from the player, the more is not working, can someone help. client- addEventHandler("onClientResourceStart", resourceRoot, function() setTimer(function() local localX, localY = getElementPosition(localPlayer) for _, blip in pairs(getElementsByType("blip")) do local blipX, blipY = getElementPosition(blip) if(getDistanceBetweenPoints2D(localX, localY, blipX, blipY) > 250) then setElementAlpha(blip, 0) else setElementAlpha(blip, 255) end end end, 500, 0) end) Has no error in debugscript 3.
  9. Good, tried to fix the DxDraw, to go adding every 5 minutes +25000 in profit, more is occurring the following error and does not add the profit in DxDraw, someone can help me? client: local lucro = getElementData("lucro") or 0 infoz = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) local x,y = guiGetScreenSize() local Text = "Name: Come a lot" local Text2 = "Lucro:" --local Text4 = "" --local Text5 = "" local lastInfoPickupHit = 0 local pickupInfoHandler = false function drawStuff() if lastInfoPickupHit < getTickCount() then if pickupInfoHandler then pickupInfoHandler = false removeEventHandler("onClientRender", root, drawStuff) end end dxDrawRectangle ( 60, 320, 250, 175, tocolor(0, 0, 0, 175), false) dxDrawText ( "INFORMAÇÃO", 145, 340, 319, 426, tocolor(255, 255, 255, 255), 1.0, "default-bold" ) dxDrawText ( Text, 80, 380, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( Text2, 80, 430, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( tostring(lucro), 135, 430, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) ---dxDrawText ( Text4, x/12, y/1.6, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) ---dxDrawText ( Text5, x/12, y/2, x, y, tocolor ( 255, 0, 0, 255 ), 0.9, "clear" ) end addEventHandler("onClientPickupHit", infoz, function (player,matchingDimension) if player == localPlayer and matchingDimension then lastInfoPickupHit = getTickCount()+5000 if not pickupInfoHandler then pickupInfoHandler = true addEventHandler("onClientRender", root, drawStuff) end end end) server: local prop = createBlip(2181.8864746094,1115.2287597656,12.34375,31) timers = {} precos={} function Hit ( player ) outputChatBox ( "Propriedades: Digite /comprar", player ) local money = getPlayerMoney(player) if(money>=200000)then takePlayerMoney ( player, 200000 ) precos[player]=200000 local currentlucro = getElementData("lucro") or 0 timers [player] = setTimer ( function ( ) setElementData("lucro", currentlucro +25000) end, 1000, 0 ) else outputChatBox("Você não tem dinheiro suficiente",player) end end addCommandHandler( "comprar" , Hit ) I know that the script has errors well visible, more is what I managed to do base
  10. I put in the dxdraw "moneyCasa", more in DxDraw appears the value NIL, how can I make to the Dx only appears the result, type is set to win 25000 every 5 minutes, and when you pass 15 minutes in DX will show the profit of 75000 that is accumulated. client- infoz = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) local x,y = guiGetScreenSize() local Text = "Name: Come a lot" local Text2 = "Lucro:" --local Text4 = "" --local Text5 = "" local lastInfoPickupHit = 0 local pickupInfoHandler = false function drawStuff() if lastInfoPickupHit < getTickCount() then if pickupInfoHandler then pickupInfoHandler = false removeEventHandler("onClientRender", root, drawStuff) end end dxDrawRectangle ( 60, 320, 250, 175, tocolor(0, 0, 0, 175), false) dxDrawText ( "INFORMAÇÃO", 145, 340, 319, 426, tocolor(255, 255, 255, 255), 1.0, "default-bold" ) dxDrawText ( Text, 80, 380, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( Text2, 80, 430, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( tostring(moneyCasa), 135, 430, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) ---dxDrawText ( Text4, x/12, y/1.6, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) ---dxDrawText ( Text5, x/12, y/2, x, y, tocolor ( 255, 0, 0, 255 ), 0.9, "clear" ) end addEventHandler("onClientPickupHit", infoz, function (player,matchingDimension) if player == localPlayer and matchingDimension then lastInfoPickupHit = getTickCount()+5000 if not pickupInfoHandler then pickupInfoHandler = true addEventHandler("onClientRender", root, drawStuff) end end end) server- local prop = createBlip(2181.8864746094,1115.2287597656,12.34375,31) timers = {} precos={} function Hit ( player ) outputChatBox ( "Propriedades: Digite /comprar", player ) local money = getPlayerMoney(player) if(money>=200000)then takePlayerMoney ( player, 200000 ) precos[player]=200000 timers [player] = setTimer ( function ( ) precos[player]=precos[player]+25000 setElementData(player,"moneyCasa",tonumber(precos[player])) end, 300000, 0 ) else outputChatBox("Você não tem dinheiro suficiente",player) end end addCommandHandler( "comprar" , Hit ) DxDraw- Do I have to use setElementData to fetch the result of values and play in a "tostring" within the DxDrawRectangle, i not understand much of setElementData someone can help me
  11. I was thinking about using a script That will make a sum of + 25000 every 5 minutes, and then use givePlayerMoney to return the result in money, after that use the command /profit. someone can help me?
  12. Good I am creating a system of properties, I left to receive the profit every 5 minutes, I would like to change that, As leave accumulated profit after passing 5 minutes, For example I get 25000 every 5 minute, and when pass 20 minutes, The profit will arrive in 100000, After using a command /profit I can pick up the accumulated profit, for this I have created a xDrawRectangle to show the profit that the property already has. client: infoz = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) local x,y = guiGetScreenSize() local Text = "Name: Come a lot" local Text2 = "Lucro:" --local Text4 = "" --local Text5 = "" local lastInfoPickupHit = 0 local pickupInfoHandler = false function drawStuff() if lastInfoPickupHit < getTickCount() then if pickupInfoHandler then pickupInfoHandler = false removeEventHandler("onClientRender", root, drawStuff) end end dxDrawRectangle ( 60, 320, 250, 175, tocolor(0, 0, 0, 175), false) dxDrawText ( "INFORMAÇÃO", 145, 340, 319, 426, tocolor(255, 255, 255, 255), 1.0, "default-bold" ) dxDrawText ( Text, 80, 380, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) dxDrawText ( Text2, 80, 430, 319, 426, tocolor(255, 255, 255, 255), 1.3, "default" ) ---dxDrawText ( Text4, x/12, y/1.6, x, y, tocolor ( 255, 255, 255, 255 ), 0.9, "clear" ) ---dxDrawText ( Text5, x/12, y/2, x, y, tocolor ( 255, 0, 0, 255 ), 0.9, "clear" ) end addEventHandler("onClientPickupHit", infoz, function (player,matchingDimension) if player == localPlayer and matchingDimension then lastInfoPickupHit = getTickCount()+5000 if not pickupInfoHandler then pickupInfoHandler = true addEventHandler("onClientRender", root, drawStuff) end end end) server: local prop = createBlip(2181.8864746094,1115.2287597656,12.34375,31) timers = {} function Hit ( player ) outputChatBox ( "Propriedades: Digite /comprar", player ) takePlayerMoney ( player, 200000 ) timers [player] = setTimer ( function ( ) givePlayerMoney ( player, 25000 ) end, 300*1000, 0 ) end addCommandHandler( "comprar" , Hit ) DxRectangle:
  13. The script now checks to see if a player is in a different interiors 0, even so is not working. addEventHandler("onClientPlayerWeaponFire", root, function() local i = getElementInterior(localPlayer) if (i ~= 0) then toggleControl("fire", false) -- desabilita o tiro e o soco else toggleControl("fire", true) end end)
  14. In the case I have to check if the player is in a different interior 0, I will confer
  15. I am using the resource "interiors" of the mta, and I would like to take the weapons when the player is within the interiors or not shoot within the same, I thought in this script, I don't know if the correct is put within the script of "interiors" for working. addEventHandler("onClientRender", root, function() local i = getElementInterior(localPlayer) if (i ~= 0) then toggleControl("fire", false) -- desabilita o tiro e o soco else toggleControl("fire", true) end end) OR if you have other means to remove the weapons and "fire" within the interiors
  16. Is working now thanks for the help
  17. Nothing happens, yet there is still the error and does not gain the profit
  18. Continues with bad argument in @givePlayerMoney and does not return the profit.
  19. i tried to work in this way the script, more displays the following error WARNING: propriedades\teste.lua:9: Bad argument @ 'givePlayerMoney' script local pickup = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) addEventHandler("onPickupHit",pickup,function(player) outputChatBox("Propriedades: Digite /comprar",player) end) addCommandHandler("comprar",function(player) if isElementWithinColShape(player,getElementColShape(pickup)) then takePlayerMoney(player,50) setTimer(function(theplayer) givePlayerMoney(source,2500) end, 5000, 0) end end)
  20. Good I am creating a system to buy properties, and earn a certain amount every 5 minutes, Is not giving right to receive the profit, I have a basis for to do, More is not giving right to connect the script. local pickup = createPickup(2181.8864746094,1115.2287597656,12.34375,3,1273,0) addEventHandler("onPickupHit",pickup,function(player) outputChatBox("Propriedades: Digite /comprar",player) end) addCommandHandler("comprar",function(player) if isElementWithinColShape(player,getElementColShape(pickup)) then takePlayerMoney(player,200000) end end) lucre setTimer(function(theplayer) givePlayerMoney(source,2500) end,300000,1)
  21. Is now working, was going on a conflict between the events, thank you for your assistance
  22. This is the complete script that I am using. local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } local spawnPlayer = function() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(source, true) setCameraTarget(source, source) end addEventHandler("onPlayerJoin",root,spawnPlayer) local spawnLocations = { {2171.90625, 1392.59765625, 10.8203125}, {2265.3674316406, 2398.3068847656, 10.8203125}, {2361.689453125, 2070.2077636719, 10.671875} } function spawnThePlayer() setTimer(function(tPlayer) local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(tPlayer,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(tPlayer, true) setCameraTarget(tPlayer, tPlayer) end, 5000, 1, source) end addEventHandler("onPlayerWasted", getRootElement(), spawnThePlayer)
  23. Continues giving bad argument in: SpawnPlayer, FadeCamera, SetCameraTarget.
  24. I was using "source" more was not working, not this more with the errors, the only problem that is not giving respawn after dying
  25. Now appeared bad argument in: SpawnPlayer, FadeCamera, SetCameraTarget. setTimer(function() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) fadeCamera(source, true) setCameraTarget(source, source) end, 5000, 1) addEventHandler("onPlayerWasted", root, setTimer)
×
×
  • Create New...