-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
are you sure there are any other think try to do maybe in that script you have something let it happend
-
function Dhooter( ) if isPedInVehicle ( localPlayer ) then local veh = getPedOccupiedVehicle ( localPlayer ) if getPedOccupiedVehicleSeat (localPlayer) == 0 then if ( getElementModel ( veh ) == 601 ) then local X, Y, Z = getElementPosition(veh) createProjectile(veh, 19 , turX, turY, turZ, 0, nil, 0, 0, 0) --createExplosion(turX, turY, turZ , 8, false, 0.5, false) end end end end
-
function Dhooter( ) if isPedInVehicle ( localPlayer ) then local veh = getPedOccupiedVehicle ( localPlayer ) if (veh) and getPedOccupiedVehicleSeat (localPlayer) == 0 then if ( getElementModel ( veh ) == 601 ) then local X, Y, Z = getElementPosition(veh) createProjectile(veh, 19 , turX, turY, turZ, 0, nil, 0, 0, 0) --createExplosion(turX, turY, turZ , 8, false, 0.5, false) end end end end
-
local GUIEditor = { window = {}, button = {}, tabpanel = {}, edit = {}, tab = {}, gridlist = {}, column = {}, label = {}, memo = {} } function createGangWindow() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 867, 477 local left, top = screenWidth/2 - windowWidth/2, screenHeight/2 - windowHeight/2 if not getElementData(localPlayer, "gang") then GUIEditor.window[1] = guiCreateWindow(left, top, windowWidth, windowHeight, "Gang Panel", false) GUIEditor.tabpanel[1] = guiCreateTabPanel(10, 36, 847, 444, false, GUIEditor.window[1]) GUIEditor.tab[1] = guiCreateTab("Create gang", GUIEditor.tabpanel[1]) GUIEditor.tab[2] = guiCreateTab("Choose Color", GUIEditor.tabpanel[1]) GUIEditor.tab[3] = guiCreateTab("Options", GUIEditor.tabpanel[1]) GUIEditor.label[1] = guiCreateLabel(48, 43, 56, 18, "Name:", false, GUIEditor.tab[1]) GUIEditor.edit[1] = guiCreateEdit(144, 43, 144, 24, "", false, GUIEditor.tab[1]) GUIEditor.button[1] = guiCreateButton(371, 43, 73, 25, "Create", false, GUIEditor.tab[1]) GUIEditor.label[2] = guiCreateLabel(48, 43, 56, 18, "Color:", false, GUIEditor.tab[2]) GUIEditor.edit[2] = guiCreateEdit(144, 43, 144, 24, "", false, GUIEditor.tab[2]) GUIEditor.button[2] = guiCreateButton(371, 43, 73, 25, "Select", false, GUIEditor.tab[2]) GUIEditor.label[3] = guiCreateLabel(48, 43, 56, 18, "Name:", false, GUIEditor.tab[3]) GUIEditor.label[4] = guiCreateLabel(48, 90, 56, 18, "Color:", false, GUIEditor.tab[3]) GUIEditor.edit[3] = guiCreateEdit(144, 43, 144, 24, "", false, GUIEditor.tab[3]) GUIEditor.edit[4] = guiCreateEdit(144, 90, 144, 24, "", false, GUIEditor.tab[3]) GUIEditor.button[3] = guiCreateButton(371, 43, 73, 25, "Change", false, GUIEditor.tab[3]) GUIEditor.button[4] = guiCreateButton(371, 90, 73, 25, "Change", false, GUIEditor.tab[3]) guiSetVisible(GUIEditor.window[1], not guiGetVisible(GUIEditor.window[1])) showCursor(not isCursorShowing()) guiSetInputEnabled(not guiGetInputEnabled()) elseif getElementData(localPlayer, "gang") then GUIEditor.window[2] = guiCreateWindow(left, top, windowWidth, windowHeight, "Gang Panel", false) GUIEditor.tabpanel[2] = guiCreateTabPanel(10, 36, 847, 444, false, GUIEditor.window[2]) GUIEditor.tab[4] = guiCreateTab("Rules", GUIEditor.tabpanel[2]) GUIEditor.tab[5] = guiCreateTab("Manage", GUIEditor.tabpanel[2]) GUIEditor.tab[6] = guiCreateTab("Members", GUIEditor.tabpanel[2]) GUIEditor.tab[7] = guiCreateTab("Invite", GUIEditor.tabpanel[2]) GUIEditor.tab[8] = guiCreateTab("Stats", GUIEditor.tabpanel[2]) GUIEditor.tab[9] = guiCreateTab("Bank", GUIEditor.tabpanel[2]) GUIEditor.memo[1] = guiCreateMemo(74, 36, 680, 351, "", false, GUIEditor.tab[4]) GUIEditor.label[5] = guiCreateLabel(48, 43, 56, 18, "Name:", false, GUIEditor.tab[5]) GUIEditor.label[6] = guiCreateLabel(48, 90, 56, 18, "Color:", false, GUIEditor.tab[5]) GUIEditor.edit[5] = guiCreateEdit(144, 43, 144, 24, "", false, GUIEditor.tab[5]) GUIEditor.edit[6] = guiCreateEdit(144, 90, 144, 24, "", false, GUIEditor.tab[5]) GUIEditor.button[5] = guiCreateButton(371, 43, 73, 25, "Change", false, GUIEditor.tab[5]) GUIEditor.button[6] = guiCreateButton(371, 43, 73, 25, "Change", false, GUIEditor.tab[5]) GUIEditor.gridlist[1] = guiCreateGridList(10, 10, 631, 386, false, GUIEditor.tab[6]) GUIEditor.column[1] = guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.5) GUIEditor.column[2] = guiGridListAddColumn(GUIEditor.gridlist[1], "Status", 0.5) GUIEditor.column[3] = guiGridListAddColumn(GUIEditor.gridlist[1], "Level", 0.5) GUIEditor.column[4] = guiGridListAddColumn(GUIEditor.gridlist[1], "Location", 0.5) GUIEditor.button[7] = guiCreateButton(671, 120, 158, 41, "Toggle Leader", false, GUIEditor.tab[6]) GUIEditor.button[8] = guiCreateButton(671, 188, 158, 41, "Kick, Player", false, GUIEditor.tab[6]) GUIEditor.button[9] = guiCreateButton(671, 258, 158, 41, "Leave Gang", false, GUIEditor.tab[6]) for _, v in ipairs(getElementsByType("player")) do if getElementData(v, "gang") then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, GUIEditor.column[1], getPlayerName(v), false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, GUIEditor.column[1], getPlayerName(v)) guiGridListSetItemText(GUIEditor.gridlist[1], row, GUIEditor.column[2], getElementData(v, "Status"), false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, GUIEditor.column[2], getElementData(v, "Status")) guiGridListSetItemText(GUIEditor.gridlist[1], row, GUIEditor.column[3], getElementData(v, "gang:level"), false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, GUIEditor.column[3], getElementData(v, "gang:level")) guiGridListSetItemText(GUIEditor.gridlist[1], row, GUIEditor.column[4], getElementData(v, "Location"), false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, GUIEditor.column[4], getElementData(v, "Location")) end end GUIEditor.gridlist[2] = guiCreateGridList(10, 10, 631, 386, false, GUIEditor.tab[7]) GUIEditor.column[5] = guiGridListAddColumn(GUIEditor.gridlist[2], "Players", 0.5) GUIEditor.button[10] = guiCreateButton(671, 120, 158, 41, "Inivte", false, GUIEditor.tab[7]) for _, v in ipairs(getElementsByType("player")) do if not getElementData(v, "gang") then local row = guiGridListAddRow(GUIEditor.gridlist[2]) guiGridListSetItemText(GUIEditor.gridlist[2], row, GUIEditor.column[5], getPlayerName(v), false, false) guiGridListSetItemData(GUIEditor.gridlist[2], row, GUIEditor.column[5], getPlayerName(v)) end end GUIEditor.gridlist[3] = guiCreateGridList(10, 10, 827, 411, false, GUIEditor.tab[8]) GUIEditor.column[6] = guiGridListAddColumn(GUIEditor.gridlist[3], "Leaders", 0.5) GUIEditor.column[7] = guiGridListAddColumn(GUIEditor.gridlist[3], "Deaths", 0.5) GUIEditor.column[8] = guiGridListAddColumn(GUIEditor.gridlist[3], "Money", 0.5) for k, p in ipairs(getElementsByType("player")) do if getElementData(p, "gang") then row = guiGridListAddRow(GUIEditor.gridlist[3]) if getElementData(p, "gang:level") == "Leader" then guiGridListSetItemText(GUIEditor.gridlist[3], row, GUIEditor.column[6], getPlayerName(p), false, false) guiGridListSetItemData(GUIEditor.gridlist[3], row, GUIEditor.column[6], getPlayerName(p)) end guiGridListSetItemText(GUIEditor.gridlist[3], row, GUIEditor.column[7], getElementData(p, "Deaths"), false, false) guiGridListSetItemData(GUIEditor.gridlist[3], row, GUIEditor.column[7], getElementData(p, "Deaths")) guiGridListSetItemData(GUIEditor.gridlist[3], row, GUIEditor.column[8], getElementData(p, "gang:money"), false, false) guiGridListSetItemData(GUIEditor.gridlist[3], row, GUIEditor.column[8], getElementData(p, "gang:money")) end end GUIEditor.gridlist[4] = guiCreateGridList(10,10 , 827, 411, false, GUIEditor.tab[9]) GUIEditor.column[9] = guiGridListAddColumn(GUIEditor.gridlist[4], "Amount", 0.5) GUIEditor.column[10] = guiGridListAddColumn(GUIEditor.gridlist[4], "Action", 0.5) GUIEditor.column[11] = guiGridListAddColumn(GUIEditor.gridlist[4], "From", 0.5) for v, k in ipairs(getElementsByType("player")) do if getElementData(k, "gang") then row = guiGridListAddRow(GUIEditor.gridlist[4]) if getElementData(k, "gang:level") == "Leader" then if getElementData(k, "gang:bank") then guiGridListSetItemText(GUIEditor.gridlist[4], row, GUIEditor.column[9], getElementData(k, "gang:amount"), false, false) guiGridListSetItemData(GUIEditor.gridlist[4], row, GUIEditor.column[9], getElementData(k, "gang:amount")) guiGridListSetItemText(GUIEditor.gridlist[4], row, GUIEditor.column[10], getElementData(k, "gang:bankaction"), false, false) guiGridListSetItemData(GUIEditor.gridlist[4], row, GUIEditor.column[10], getElementData(k, "gang:bankaction")) guiGridListSetItemText(GUIEditor.gridlist[4], row, GUIEditor.column[11], getPlayerName(k), false, false) guiGridListSetItemData(GUIEditor.gridlist[4], row, GUIEditor.column[1], getPlayerName(k)) end end end end guiSetVisible(GUIEditor.window[2], not guiGetVisible(GUIEditor.window[2])) showCursor(not isCursorShowing()) guiSetInputEnabled(not guiGetInputEnabled()) if getElementData(localPlayer, "gang:level") ~= "Leader" then guiMemoSetReadOnly(GUIEditor.memo[1], true) guiSetVisible(GUIEditor.tab[7], false) guiSetVisible(GUIEditor.tab[5], false) guiSetVisible(GUIEditor.button[7], false) guiSetVisible(GUIEditor.button[8], false) end end end bindKey("F3", "down", createGangWindow) function createInviteWindow() local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 434, 139 local left, top = screenWidth/2 - windowWidth/2, screenHeight/2 - windowHeight/2 GUIEditor.window[3] = guiCreateWindow(left, top, windowWidth, windowHeight, "Gang Invite", false) GUIEditor.label[7] = guiCreateLabel(10, 52, 414, 15, "You have been invite from gang "..getElementData(source, "gang").." do you want join?", false, GUIEditor.window[3]) GUIEditor.button[11] = guiCreateButton(58, 91, 47, 22, " Yes", false, GUIEditor.window[3]) GUIEditor.button[12] = guiCreateButton(162, 91, 47, 22, "No", false, GUIEditor.want[3]) end addEventHandler("onClientGUIClick", root, function(button, state) if not GUIEditor.window[1] or not guiGetVisible(GUIEditor.window[1]) then return end if not GUIEditor.window[2] or not guiGetVisible(GUIEditor.window[2]) then return end if source == GUIEditor.button[1] then gang = guiGetText(GUIEditor.edit[1]) triggerServerEvent("creategang", localPlayer, gang) elseif source == GUIEditor.button[2] or source == GUIEditor.button[4] or source == GUIEditor.button[6] then color = guiGetText(GUIEditor.edit[2]) or guiGetText(GUIEditor.edit[4]) or guiGetText(GUIEditor.edit[6]) triggerServerEvent("setgangcolor", localPlayer, color) setElementData(localPlayer, "gang:color", color) elseif source == GUIEditor.button[3] or source == GUIEditor.button[5] then gang = guiGetText(GUIEditor.edit[3]) or guiGetText(GUIEditor.edit[5]) triggerServerEvent("setgangname", localPlayer, gang) elseif source == GUIEditor.button[7] then if guiGridListGetSelectItem(GUIEditor.gridlist[1]) == -1 then outputChatBox("Select a player!", 255, 0, 0) return end target = guiGridListGetItemData(GUIEditor.gridlist[1], guiGridListGetSelectItem(GUIEditor.gridlist[1]), 1) if getElementData (target, "gang:level") == "member" then setElementData(target, "gang:level", "Leader") outputChatBox(getPlayerName(target).." promoted to leader of this gang!".." by "..getPlayerName(localPlayer)) else setElementData(target, "gang:level", "Member") outputChatBox(getPlayerName(target).." demoted to member of this gang!".." by "..getPlayerName(localPlayer)) end elseif source == GUIEditor.button[8] then if guiGridListGetSelectItem(GUIEditor.gridlist[1]) == -1 then outputChatBox("Select a player!", 255, 0, 0) return end target = guiGridListGetItemData(GUIEditor.gridlist[1], guiGridListGetSelectItem(GUIEditor.gridlist[1]), 1) setElementData(target, "gang", "N/A") outputChatBox(getPlayerName(target).." has been kicked from gang!".." by "..getPlayerName(localPlayer)) elseif source == GUIEditor.button[9] then setElementData(localPlayer, "gang", "N/A") outputChatBox(getPlayerName(localPlayer).. "has left from gang!") showCursor(false) guiSetVisible(GUIEditor.window[2], false) elseif source == GUIEditor.button[10] then if guiGridListGetSelectItem(GUIEditor.gridlist[2]) == -1 then outputChatBox("Select a player!", 255, 0, 0) return end target = guiGridListGetItemData(GUIEditor.gridlist[2], guiGridListGetSelectItem(GUIEditor.gridlist[2]), 1) outputChatBox(getPlayerName(target).." has been invite to the gang!") if target then createInviteWindow() guiSetVisible(GUIEditor.window[3], true) showCursor(true) if source == GUIEditor.button[11] then setElementData(target, "gang", getElementData(localPlayer, "gang")) setElementData(target, "gang:level", "Member") outputChatBox("You join the gang".. getElementData(localPlayer, "gang")) guiSetVisible(GUIEditor.window[3], false) showCursor(false) elseif source == GUIEditor.button [12] then guiSetVisible(GUIEditor.window[3], false) showCursor(false) end end end end) the window not show up but the cursor does any help not error or warning
-
https://wiki.multitheftauto.com/wiki/DxDrawCircle
-
np
- 3 replies
-
- gui
- graphical user interface
-
(and 1 more)
Tagged with:
-
instead use GUIEditor.button[1] again put GUIEditor.button[3] and 4
- 3 replies
-
- gui
- graphical user interface
-
(and 1 more)
Tagged with:
-
you mean create a vehicle when a player click a button right then you need createVehicle
-
what do you mean spawn create? for key it item you can create or data a player has for that vehicle
-
addEventHandler("onClientResourceStart", resourceRoot, function() mainWindow = guiCreateWindow(0.05, 0.08, 0.89, 0.83, "", true) guiWindowSetMovable(mainWindow, false) guiWindowSetSizable(mainWindow, false) guiSetAlpha(mainWindow, 0.90) mainImage = guiCreateStaticImage(845, 18, 367, 611, ":freeroam_login/images/chick.png", false, mainWindow) mainText = guiCreateLabel(0.01, 0.04, 0.68, 0.13, "Welcome to San Andreas Online. This is a pre-alpha preview of the server.", true, mainWindow) playButton = guiCreateButton(0.88, 0.93, 0.12, 0.06, "PLAY", true) setCameraMatrix(1945, -1690, 67, 1902, -1602, 13) setPlayerHudComponentVisible("all", false) showCursor(true) showChat(false) end ) function buttonPress(btn, state) if btn == "left" and state == "up" then if source == playButton then triggerServerEvent("spawnPlayerPos", resourceRoot) destroyElement(mainWindow) destroyElement(playButton) end end end addEventHandler("onClientGUIClick", resourceRoot, buttonPress)
-
function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." is now ONduty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." is now onduty!") setElementData( player, "food", 100 ) setElementData( player, "thirst", 100 ) setElementData( player, "temperature", 36.5 ) setElementData( player, "bleeding", false ) setElementData( player, "brokenbone", false ) setElementData( player, "pain", false ) setElementData( player, "cold", false ) setElementData( player, "humanity", 2500 ) triggerClientEvent(player, "onDuty", player) heal = "9999999999999999999999999999" end end addCommandHandler("duty",aduty) function offduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." is now OFFduty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." is now OFFduty!") setElementData( player, "blood", 12000 ) triggerClientEvent(player, "onDuty", player) heal = "12000" end end addCommandHandler("offduty",offduty)
-
function makePlayerZombie() if getTeamName(getPlayerTeam(source))== "Infected" then outputChatBox("You spawned as a zombie, so you do not have to be afraid for other zombies anymore!", player, 255, 0, 0) setElementData (source,'zombie',true) else return false end end addEventHandler('onPlayerSpawn', getRootElement(), makePlayerZombie) function removePlayerZombie() if getElementData (source,'zombie',true) then setElementData (source,'zombie',false) end end addEventHandler('onPlayerWasted', getRootElement(), removePlayerZombie)
-
local gate = createObject ( 8378,1064.3000488281,1771,19.700000762939,0,0,0 ) local state = 0 function move(thePlayer) if getElementData(thePlayer, "group") == "Your group name here" then if state == 0 then moveObject ( gate,4000,1064.3000488281,1771.0999755859,40.099998474121) state = state + 1 elseif state == 1 then moveObject ( gate, 4000,1064.3000488281,1771,19.700000762939) state = state - 1 end end end addCommandHandler("gate", move )
-
fristly i want make it be able write and then when click on video play the song
-
and be able to write in webbrowser
-
i mean when a player write a song and click on video i want removeEvent fro image but the sound keep play
-
Hello there i have make a browser i want to take sound and delete the browser when play then sound but i can make it write on browser any help local screenWidth, screenHeight = guiGetScreenSize() local webBrowser = createBrowser(screenWidth, screenHeight, false, false) function webBrowserRender() dxDrawImage(0, 0, screenWidth, screenHeight, webBrowser, 0, 0, 0, tocolor(255, 255, 255, 255), true) showCursor(true) end addEventHandler("onClientBrowserCreated", webBrowser, function() loadBrowserURL(source, "http://www.youtube.com") addEventHandler("onClientRender", root, webBrowserRender) sound = playSound(getBrowserURL(webBrowser)) setBrowserVolume(webBrowser, 0.5) if sound then removeEventHandler("onClientRender", root, webBrowserRender) showCursor(false) end end )
-
local screenWidth, screenHeight = guiGetScreenSize() dxDrawImage(screenWidth/2 - imageWidth/2, screemHeight/2 - imageHeight/2) etc
-
local x, y = guiGetScreenSize() local message = false local r, g, b function Notifactions() dxDrawRectangle(x/2-800/2, 0, 800, 50, tocolor(0, 0, 0, 220), false, false) dxDrawText(message, 0, 15, x, y, tocolor(r, g, b, 220), 1, "default", "center", "top", false, false, true) end function sendClientMessage(message, r, g, b, colorCode) message = tostring(message) if not message then return end r,g ,b = tonumber(r), tonumber(g), tonumber(b) if not colorCode then colorCode = false else colorCode = true r,g,b = getColorFromString(message) end addEventHandler("onClientRender", root, Notifactions) setTimer(function() removeEventHandler("onClientRender", root, Notifactions) message = false end, 5000, 1) end addEvent("sendClientMessage", true) addEventHandler("sendClientMessage", root, sendClientMessage) dxDrawText expect string argument 1 got boolean
-
i mean x not take from guiGetScreenSize neither message