Jump to content

mint3d

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by mint3d

  1. Neons don't show up at all and no errors want me to show you client side?
  2. line 10 I should also say i am using roleplay scripts but would it matter?
  3. Still not working
  4. Error line 149 attempt to call global 'getPedOccupiedveh' a nil value --determine whether color change can be made with a command cmd = true --the command to use thecmd = "neon" function neon(plr,cmd,r,g,b,a) if not r then openGui(plr) return true end if tonumber(tostring(r)) == nil then r,g,b,a = getColorFromString(r) end if not a then a = 200 end veh = getPedOccupiedveh(plr) if veh and r and g and b then model = getElementModel(veh) if canHaveNeon(veh) then if haveNeon(veh) then setNeonColor(veh,tonumber(r),tonumber(g),tonumber(b)) end end end end if cmd then addCommandHandler(thecmd,neon) end function setNeonColor(veh,r,g,b) setElementData(veh,"neonlight",tostring(r)..","..tostring(g)..","..tostring(b)..","..tostring(a)) for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(veh,"neonMarker1") local data2 = getElementData(veh,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,r,g,b,80) end end end return true end function haveNeon(veh) local data = getElementData(veh,"haveneon") if data then return true else return false end end function addNeon(veh,state) if getElementType(veh) == "vehicle" then if state then setElementData(veh,"haveneon",true) x,y,z = getElementPosition(veh) -- local exist = nil for i,mark in ipairs(getElementsByType("marker")) do data = getElementData(veh,"neonMarker1") if data == mark then local exist = mark end end if not exist then local marker1 = createMarker(x,y,z,"corona",2,0,0,0,0) attachElements(marker1,veh,0,-1,-1.2) setElementData(veh,"neonMarker1",marker1) local marker2 = createMarker(x,y,z,"corona",2,0,0,0,0) attachElements(marker2,veh,0,1,-1.2) setElementData(veh,"neonMarker2",marker2) end -- return true else setElementData(veh,"haveneon",false) setElementData(veh,"neonlight","off!!!") -- for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(veh,"neonMarker1") local data2 = getElementData(veh,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,0,0,0,0) end end end -- return true end else return false end end function canHaveNeon(veh) model = getElementModel(veh) if veh and getElementType(veh) == "vehicle" then x = mayHaveNeon(model) return x else return false end end function mayHaveNeon(model) if model ~= 592 and model ~= 511 and model ~= 584 and model ~= 512 and model ~= 593 and model ~= 417 and model ~= 487 and model ~= 553 and model ~= 488 and model ~= 563 and model ~= 476 and model ~= 519 and model ~= 460 and model ~= 469 and model ~= 513 and model ~= 472 and model ~= 473 and model ~= 493 and model ~= 595 and model ~= 484 and model ~= 430 and model ~= 453 and model ~= 452 and model ~= 446 and model ~= 454 and model ~= 403 and model ~= 514 and model ~= 443 and model ~= 515 and model ~= 455 and model ~= 406 and model ~= 486 and model ~= 578 and model ~= 532 and model ~= 524 and model ~= 498 and model ~= 609 and model ~= 568 and model ~= 457 and model ~= 508 and model ~= 571 and model ~= 539 and model ~= 606 and model ~= 607 and model ~= 485 and model and model ~= 581 and model ~= 509 and model ~= 481 and model ~= 462 and model ~= 521 and model ~= 463 and model ~= 510 and model ~= 522 and model ~= 461 and model ~= 448 and model ~= 468 and model ~= 586 and model ~= 485 and model ~= 552 and model ~= 431 and model ~= 438 and model ~= 437 and model ~= 574 and model ~= 525 and model ~= 408 and model ~= 416 and model ~= 433 and model ~= 427 and model ~= 490 and model ~= 528 and model ~= 407 and model ~= 544 and model ~= 523 and model ~= 470 and model ~= 596 and model ~= 597 and model ~= 598 and model ~= 599 and model ~= 432 and model ~= 601 and model ~= 428 and model ~= 499 and model ~= 449 and model ~= 537 and model ~= 538 and model ~= 570 and model ~= 569 and model ~= 590 and model ~= 441 and model ~= 464 and model ~= 501 and model ~= 465 and model ~= 564 and model ~= 594 then return true else return false end end function deactivateNeon(veh) if getElementType(veh) == "vehicle" then setElementData(veh,"neonlight","off!!!") for i,mark in ipairs(getElementsByType("marker")) do local type = getMarkerType(mark) if type == "corona" then local data1 = getElementData(veh,"neonMarker1") local data2 = getElementData(veh,"neonMarker2") if data1 == mark or data2 == mark then setMarkerColor(mark,0,0,0,0) end end end return true else return false end end function openGui(plr) local veh = getPedOccupiedveh(plr) if haveNeon(veh) then triggerClientEvent(plr,"openNeonGui",root) end end addEventHandler("onPlayerJoin",root,function() for i,veh in ipairs(getElementsByType("vehicle")) do data = getElementData(veh,"neonlight") setElementData(veh,"neonlight",data) end end) for i,veh in ipairs(getElementsByType("vehicle")) do deactivateNeon(veh) end addEvent("closeNeonGui",true) addEventHandler("closeNeonGui",root,function(r,g,b) local veh = getPedOccupiedveh(source) setNeonColor(veh,r,g,b) end)
  5. Do you want all vehicles to respawn or just the one?
  6. Can you finish what you were going to say? Unexpected symbol near ')'
  7. Ok so I made this script but every time the script restarts the power resets can anyone help me please? mysql = exports.mysql function powerChange ( thePlayer, command, power ) if exports.global:isPlayerLeadAdmin(thePlayer) then power = tonumber ( power ) local veh = getPedOccupiedVehicle ( thePlayer ) if power and veh then local success = setVehicleHandling ( veh, "engineAcceleration", power ) if success then outputChatBox ( "Your vehicle's acceleration has been changed to: "..power.." ", thePlayer, 0, 255, 0 ) local dbid = getElementData(veh, "dbid") mysql:query_free("UPDATE vehicles SET power="..power.." WHERE id="..dbid) exports.logs:dbLog(thePlayer, 40, veh, "SETPOWER: "..power.."") else outputChatBox ( "Setting power failed.", thePlayer, 255, 0, 0 ) end elseif not veh then outputChatBox ( "You're not in a vehicle.", thePlayer, 255, 0, 0 ) elseif not power then outputChatBox ( "Syntax: /setpower [1 - 100000]", thePlayer, 255, 0, 0 ) end end end addCommandHandler ( "setpower", powerChange )
  8. You could also think about finding a image like a blurred background and do it like guiCreateStaticImage
  9. mint3d

    Help

    Ok so can you help me?
  10. mint3d

    Help

    Ok I want to know if its possible to do like this /eventchat Hello but it outputs it like this exports["TopBarChat"]:sendClientMessage
  11. mint3d

    Marker Help

    Thanks worked
  12. mint3d

    Marker Help

    Ok I have this and I want to know how to destroy it with the command /deletemarker function CreateFinishingMarker ( thePlayer, commandName ) if ( thePlayer ) then local x, y, z = getElementPosition ( thePlayer ) local theMarker = createMarker ( x + 2, y + 2, z, "cylinder", 1.5, 255, 255, 0, 170 ) if ( theMarker ) then outputConsole ( "Marker created successfully", thePlayer ) else outputConsole ( "Failed to create marker", thePlayer ) end end end addCommandHandler ( "createmarker", CreateMarker )
  13. mint3d

    Car Spawner

    Ok I made a car spawner script but I need help I want to be able to press F4 and it opens a GUI so I can make the marker in game and the cars I want in the marker like this one here here is my script Client Wnd = guiCreateWindow(550,100,382,450,"Vehicle System",false) guiSetAlpha( Wnd, 1 ) guiWindowSetMovable(Wnd,true) guiWindowSetSizable(Wnd,false) button = guiCreateButton(36,400,110,47,"Exit",false,Wnd) button2 = guiCreateButton(249,400,110,47,"Spawn",false,Wnd) label2 = guiCreateLabel(127,47,242,15,'',false,Wnd) label = guiCreateLabel(127,34,242,15,"Click on the vehicle you want",false,Wnd) guiLabelSetVerticalAlign(label2,"center") guiLabelSetHorizontalAlign(label2,"center",false) showCursor(false) guiSetVisible( Wnd, false ) vehicles = { {"Bmx", 481},{"Mountain Bike", 510},{"Faggio", 462},--formet "carname", "carid" } grid = guiCreateGridList(36,78,300,300,false,Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use2() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then --takePlayerMoney (thePlayer, 1000) --takePlayerMoney (player, 1000) triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientGUIClick", button2, use2, false) function close2() if (source == button2) then --takePlayerMoney (localPlayer, 1000) guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button2, close2) function close() if (source == button) then guiSetVisible(Wnd,false) showCursor(false) end end addEventHandler("onClientGUIClick", button, close) function showGUI2(hitElement) guiSetVisible(Wnd,true) if getElementType(hitElement) == "player" and (hitElement == localPlayer) then showCursor(true) end end addEvent("showGUI2",true) addEventHandler("showGUI2", getRootElement(), showGUI2) server t = createMarker( 2030.01,1545.35,9.5, "cylinder", 2, 0, 100, 255, 100 ) f = createMarker( 2482.7263183594,-1686.0427246094,12.8, "cylinder", 2, 0, 100, 255, 100 ) g = createMarker( 2001.3251953125,-1444,12.8, "cylinder", 2, 0, 100, 255, 100 ) h = createMarker( 1184.890625,-1319,12.8, "cylinder", 2, 0, 100, 255, 100 ) j = createMarker( 1624.0262451172,1818,9.6, "cylinder", 2, 0, 100, 255, 100 ) k = createMarker( 1701.2663574219,1439,9.6, "cylinder", 2, 0, 100, 255, 100 ) l = createMarker( -2662.2287597656,600,12.8, "cylinder", 2, 0, 100, 255, 100 ) m = createMarker( -2204.9958496094,1694,7.2, "cylinder", 2, 0, 100, 255, 100 ) local vehicles = {} function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 3, y, z) warpPedIntoVehicle ( source, vehicles[source] ) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end) function showGUI(hitPlayer) if source == f or source == t or source == g or source == h or source == j or source == k or source == l or source == m then triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end end addEventHandler("onMarkerHit",root,showGUI)
  14. math.random( #vehicleIDS)
  15. the meta.xml I don't think the phone was added on it
  16. mint3d

    Hot Dog Van

    Ok Solid I need help that checks if players in the van now when I /hotdogs how to do that bit? and how would I set price for the food?
  17. mint3d

    Hot Dog Van

    Sorry for double post but is this right? function vehicle ( theVehicle, seat, theplayer ) local id = getElementModel ( theVehicle ) if id == 588 then local vehicleName = getVehicleName ( theVehicle ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) if theVehicle then outputChatBox ("type /hotdogs to sell food and drinks" , thePlayer ) end end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
  18. GUIEditor = { tab = {}, tabpanel = {}, label = {}, button = {}, window = {}, memo = {} } --addEventHandler("onClientResourceStart", resourceRoot, function openAdminPanel() --remove openadminpanel when above part is applied GUIEditor.window[1] = guiCreateWindow(217, 14, 391, 524, "Server Help Page", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) showCursor(true) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 23, 371, 432, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Stuff", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Vehicle Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[3] = guiCreateTab("Player Commands", GUIEditor.tabpanel[1]) GUIEditor.tab[4] = guiCreateTab("Rules", GUIEditor.tabpanel[1]) GUIEditor.memo[1] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[1]) GUIEditor.memo[2] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[2]) GUIEditor.memo[3] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[3]) GUIEditor.memo[4] = guiCreateMemo(6, 8, 359, 389, "", false, GUIEditor.tab[4]) GUIEditor.button[1] = guiCreateButton(63, 472, 260, 29, "Close Server Help Page", false, GUIEditor.window[1]) addEventHandler("onClientGUIClick",GUIEditor.button[1],closeHelpPage) end --) addCommandHandler("helpMe",openAdminPanel) function closeHelpPage() guiSetVisible(GUIEditor.window[1],false) showCursor(false) end
  19. mint3d

    Hot Dog Van

    Can you give me a start? is this right? function vehicle ( theVehicle, seat, theplayer) local id = getElementModel ( theVehicle ) if id == 588 then local vehicleName = getVehicleName ( theVehicle ) local theVehicle = getPedOccupiedVehicle ( thePlayer ) end end addEventHandler ( "onPlayerVehicleEnter", getRootElement(), vehicle )
  20. mint3d

    Hot Dog Van

    Ok I was wondering if its posible to make a script that you can do like /hotdogs while in the hotdog van and it will make a marker so you can sell hotdogs burgers and soda or somthing anyhelp?
  21. mint3d

    output help

    Thanks I got it working
  22. mint3d

    output help

    Ok so I want somthing simple I want to output text when a player joins using this exports["TopBarChat"]:sendClientMessage anyhelp?
  23. mint3d

    GUI Help

    Thanks Solid Works good
  24. mint3d

    GUI Help

    When I hit close it doesn't close anyhelp? GUIEditor = { button = {} } function openAdminPanel () adminPanel = guiCreateWindow(157, 99, 481, 343, "Admin Panel - DayZ", false) guiWindowSetMovable(adminPanel, false) guiWindowSetSizable(adminPanel, false) adminPanelButton = guiCreateButton(388, 307, 84, 27, "Close", false, adminPanel) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") adminPanelMemo = guiCreateMemo(9, 24, 183, 48, "Do not abuse your admin powers , thank you.", false, adminPanel) guiSetAlpha(adminPanelMemo, 0.91) guiMemoSetReadOnly(adminPanelMemo, true) showCursor( true) end addCommandHandler("openadmin",openAdminPanel,true,false) function closeAdminPanel() root = getRootElement() destroyElement(root) end addEventHandler("onClientGUIClick",adminPanelButton,closeAdminPanel)
  25. Only players who are on the ACL Admin can use it
×
×
  • Create New...