Jump to content

mint3d

Members
  • Posts

    425
  • Joined

  • Last visited

Everything posted by mint3d

  1. Ok so I made a car spawner script but I need help I need help on adding teams to some of them for example you can only use a certain one if your in a certain team heres the code 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},--format "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) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",t,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",f,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",g,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMearkerHit",h,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",j,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",k,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",l,showGUI) function showGUI(hitPlayer) triggerClientEvent (hitPlayer,"showGUI2",getRootElement(),hitPlayer) end addEventHandler("onMarkerHit",m,showGUI)
  2. mint3d

    Need help

    Works great thanks TAPL
  3. mint3d

    Need help

    Ok so basically it outputs this output every time someone joins or spawns function onPlayerSpawn (player) spawnPlayer ( source, 2816.32, -1100.19, 97.93 ) setPlayerTeam ( source, drift ) givePlayerMoney ( source, 50000 ) fadeCamera ( source, true, 3 ) setElementModel ( source, 29 ) outputChatBox ( "Welcome to New Drift Server", getRootElement(), 255, 0, 0 ) outputChatBox ( "Look at : /cmd and /teleports", getRootElement(), 0, 255, 0 ) setPlayerNametagColor ( player, 0, 255, 0 ) setCameraTarget ( source, source ) end addEventHandler ( "onPlayerJoin", getRootElement(), onPlayerSpawn )
  4. mint3d

    Need Help

    I don't know what you mean show me?
  5. mint3d

    Need Help

    What do you mean remove onClientRender it needs that for it to work doesn't it?
  6. mint3d

    Need Help

    Didnt work If it would be easier we could use onClientPLayerSpawn local x,y = guiGetScreenSize() local textPosition = 0 -- Main counter. You can do the same with anything you want to move or change per frame. local text = "MOTD: Welcome to the server hope you have fun!" local animate = true function renderText() if animate == true then -- If we want to animate stuff textPosition = textPosition + 1 if textPosition > x then textPosition = 0 end dxDrawText(text,textPosition,0.2/2,x,y, tocolor ( 255, 255, 255, 1000 ), 1.5, "default-bold" ) dxDrawRectangle ( x/2.2, y/2000, x/0, y/25, tocolor ( 0, 0, 0, 255 ) ) -- Create our black transparent MOTD background Rectangle. -- Create our black transparent MOTD background Rectangle. -- Create our black transparent MOTD background Rectangle. -- draw the text -- Add this into the "if" check if you don't want to draw it anymore dxDrawText(text,textPosition,0/2,x,y, tocolor ( 255, 255, 255, 1000 ), 1.5, "default-bold" ) end end addEventHandler("onClientRender",getRootElement(),renderText) addEventHandler ( "onClientGUIClick",bLogin,function() animate = false -- Stop animating. end)
  7. mint3d

    Need Help

    I need some help on this code I made When I login it still shows local x,y = guiGetScreenSize() local textPosition = 0 -- Main counter. You can do the same with anything you want to move or change per frame. local text = "MOTD: Welcome to the server have fun!" local animate = true function renderText() if animate == true then -- If we want to animate stuff textPosition = textPosition + 1 if textPosition > x then textPosition = 0 end end dxDrawText(text,textPosition,0.2/2,x,y, tocolor ( 255, 255, 255, 1000 ), 1.5, "default-bold" ) dxDrawRectangle ( x/2.2, y/2000, x/0, y/25, tocolor ( 0, 0, 0, 255 ) ) -- Create our black transparent MOTD background Rectangle. -- Create our black transparent MOTD background Rectangle. -- Create our black transparent MOTD background Rectangle. -- draw the text -- Add this into the "if" check if you don't want to draw it anymore dxDrawText(text,textPosition,0/2,x,y, tocolor ( 255, 255, 255, 1000 ), 1.5, "default-bold" ) end addEventHandler("onClientRender",getRootElement(),renderText) addEventHandler ( "onClientGUIClick",loginButton,function() animate = false -- Stop animating. end)
  8. I know how to script so ye stfu maybe think before saying shit check my recent post bitch
  9. I mean like say for example its a info icon and you walk into it it will say This is a building from 1982 or somthing
  10. OK so I need a little help, basically I want to create a pick up that outputs text into chat box how can I do this?
  11. mint3d

    GUI Help

    Works thank you
  12. mint3d

    GUI Help

    bLogin is created in a different function and its created on the gui function which is this function LoginScreen_openLoginScreen()
  13. mint3d

    GUI Help

    local x,y = guiGetScreenSize() local playerName = getPlayerName ( localPlayer ) local MOTDText = "Welcome to our server!" function drawStuff () dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) -- Create MOTD text. end addEventHandler("onClientRender", getRootElement(), drawStuff) function closedrawStuff () removeEventHandler("onClientRender",getRootElement(),drawStuff) outputChatBox ( "#FF0000Hello #00FF00World", getRootElement(), 255, 255, 255, true ) end addEventHandler("onClientGUIClick",bLogin,closedrawStuff) Didn't out put anything
  14. mint3d

    GUI Help

    the same script bLogin = guiCreateButton(50, 200, 210, 46, "Login", false, wLogin) guiSetFont(bLogin, "default-bold-small") addEventHandler("onClientGUIClick", bLogin, LoginScreen_validateLogin, false)
  15. mint3d

    GUI Help

    I need help it doesn't close the dx local x,y = guiGetScreenSize() local playerName = getPlayerName ( localPlayer ) local MOTDText = "Welcome to our server!" function drawStuff () dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) -- Create MOTD text. end addEventHandler("onClientRender", getRootElement(), drawStuff) function closedrawStuff () removeEventHandler("onClientRender",getRootElement(),drawStuff) end addEventHandler("onClientGUIClick",bLogin,closedrawStuff)
  16. mint3d

    RPG

    I did i didnt find much i mean i found like j-rpg but its not good
  17. mint3d

    RPG

    I need some RPG scripts anyone know where i can get some?
  18. mint3d

    Need some help

    use this? local x,y = guiGetScreenSize() local textPosition = 0 -- Main counter. You can do the same with anything you want to move or change per frame. local text = "This text is moving right!" function renderText() dxDrawText(text,textPosition,y/2,x,y) -- draw the text end addEventHandler("onClientRender",getRootElement(),renderText) function renderAnimation() textPosition = textPosition + 1 -- Move by one pixel each frame if textPosition > x then -- If the text is out of the screen textPosition = 0 -- Make it come back to the default position end addEventHandler("onClientPreRender",getRootElement(),renderAnimation) -- Applying the animation before rendering the text to make animation work properly addEventHandler ( "onClientGUIClick",loginButton,function() removeEventHandler("onClientPreRender",getRootElement(),renderAnimation) -- Removing the animation. You can also remove event handler for renderText if you want to remove the text completely end)
  19. ye he seems like a nice guy
  20. mint3d

    Need some help

    I only want it to animate it on login like a welcome to going across the top I got the pos right just need to know how to stop it
  21. Works fine and it has no bugs so ye work that out
×
×
  • Create New...