forked from Simnation/Main
ed
This commit is contained in:
parent
ad226c88a2
commit
8254b4913c
12 changed files with 145 additions and 0 deletions
67
resources/[carscripts]/mx_fixwiring/client/main.lua
Normal file
67
resources/[carscripts]/mx_fixwiring/client/main.lua
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
-- How to use
|
||||||
|
-- CircuitGame('x', 'y', 'scale', 'tamanho do jogo em vmin', '1.ogg', function()
|
||||||
|
-- run something
|
||||||
|
-- end)
|
||||||
|
|
||||||
|
-- parameters
|
||||||
|
-- x = position on screen
|
||||||
|
-- y = position on screen
|
||||||
|
-- scale = game size on screen in scale (Normally 1.0)
|
||||||
|
-- sound_name = audio name + format (example 1.ogg)
|
||||||
|
|
||||||
|
-- example
|
||||||
|
-- TriggerEvent("Mx::StartMinigameElectricCircuit", '50%', '92%', '1.0', '30vmin', '1.ogg', function()
|
||||||
|
-- print("Oops, I hit the code and ran something")
|
||||||
|
-- end)
|
||||||
|
|
||||||
|
-- /startgame 50% 50% 1.0 30vmin 1.ogg
|
||||||
|
|
||||||
|
CallBackFunction = nil
|
||||||
|
|
||||||
|
RegisterCommand('startgame', function(src, args, cmd)
|
||||||
|
TriggerEvent("Mx::StartMinigameElectricCircuit", args[1], args[2], args[3], args[4], args[5], function()
|
||||||
|
print(">>>>>> Success <<<<<<")
|
||||||
|
end)
|
||||||
|
end, false)
|
||||||
|
|
||||||
|
RegisterNetEvent('Mx::StartMinigameElectricCircuit')
|
||||||
|
AddEventHandler('Mx::StartMinigameElectricCircuit', function(x, y, scale, size_game, sound_name, Callback)
|
||||||
|
CircuitGame(x, y, scale, size_game, sound_name, Callback)
|
||||||
|
end)
|
||||||
|
|
||||||
|
function CircuitGame(x, y, scale, size_game, sound_name, Callback)
|
||||||
|
SetNuiFocus(true,true)
|
||||||
|
SendNUIMessage({
|
||||||
|
ui = 'ui',
|
||||||
|
NuiOpen = true,
|
||||||
|
x = x,
|
||||||
|
y = y,
|
||||||
|
scale = scale,
|
||||||
|
size_game = size_game,
|
||||||
|
sound_name = sound_name,
|
||||||
|
name_resource = GetCurrentResourceName()
|
||||||
|
})
|
||||||
|
CallBackFunction = Callback
|
||||||
|
end
|
||||||
|
|
||||||
|
RegisterNUICallback('electric_circuit_completed', function(data, cb)
|
||||||
|
CallBackFunction()
|
||||||
|
CloseNui()
|
||||||
|
cb('ok')
|
||||||
|
end)
|
||||||
|
|
||||||
|
RegisterNUICallback('CloseNui', function(data, cb)
|
||||||
|
CloseNui()
|
||||||
|
cb('ok')
|
||||||
|
end)
|
||||||
|
|
||||||
|
function CloseNui()
|
||||||
|
local ped = PlayerPedId()
|
||||||
|
ClearPedTasks(ped)
|
||||||
|
|
||||||
|
SetNuiFocus(false, false)
|
||||||
|
SendNUIMessage({
|
||||||
|
ui = 'ui',
|
||||||
|
NuiOpen = false,
|
||||||
|
})
|
||||||
|
end
|
27
resources/[carscripts]/mx_fixwiring/fxmanifest.lua
Normal file
27
resources/[carscripts]/mx_fixwiring/fxmanifest.lua
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
fx_version 'cerulean'
|
||||||
|
|
||||||
|
game 'gta5'
|
||||||
|
|
||||||
|
description 'Mx Fix Wiring'
|
||||||
|
|
||||||
|
version '1.1'
|
||||||
|
|
||||||
|
ui_page 'html/index.html'
|
||||||
|
|
||||||
|
|
||||||
|
server_scripts {
|
||||||
|
'server/*'
|
||||||
|
}
|
||||||
|
|
||||||
|
client_scripts {
|
||||||
|
'client/*'
|
||||||
|
}
|
||||||
|
|
||||||
|
files {
|
||||||
|
'html/index.html',
|
||||||
|
'html/css/*.css',
|
||||||
|
'html/js/*.js',
|
||||||
|
'html/img/*.png',
|
||||||
|
'html/sound/*.ogg',
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
@import url(https://fonts.googleapis.com/css2?family=Bree+Serif&display=swap);body{margin:0;display:grid;place-items:center;height:100vh;overflow:hidden}#container{position:absolute;top:0;left:0;transform:translate(0) scale(1)}svg{height:auto;border-radius:2vh}.drag,.light{opacity:0}.drag{fill:#fff}.line{stroke-width:18px}.line,.line-back{pointer-events:none}.line-back{stroke-width:30px}.line-1{stroke:#324d9c}.line-2{stroke:#e52320}.line-3{stroke:#ffeb13}.line-4{stroke:#a6529a}.c{fill:#273065;stroke:#1a1b36}.c,.d,.e,.f,.k,.u{stroke-miterlimit:10}.c,.d,.e,.f,.u,.y{stroke-width:5px}.d{fill:#71160e;stroke:#280f10}.e{fill:#8c6c15}.e,.u{stroke:#38321a}.f{fill:#212021;stroke:#000}.h{fill:#9b3015;stroke:#471d12}.h,.y{stroke-linecap:round;stroke-linejoin:round}.k,.y{fill:none}.k{stroke:#1d1d1b;stroke-width:6px}.l{fill:#d9c905}.m{fill:#25378d}.n{fill:#324d9c}.o{fill:#a71916}.p{fill:#e52320}.q{fill:#aa9f17}.r{fill:#ffeb13}.s{fill:#90378c}.t{fill:#a6529a}.u{fill:#1d1d1b}.v{fill:#5b5c64}.w{fill:#292829}.x{fill:#2f3038}.y{stroke:#252526}
|
BIN
resources/[carscripts]/mx_fixwiring/html/favicon.ico
Normal file
BIN
resources/[carscripts]/mx_fixwiring/html/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
1
resources/[carscripts]/mx_fixwiring/html/index.html
Normal file
1
resources/[carscripts]/mx_fixwiring/html/index.html
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>celularprojeto</title><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100&family=Poppins:wght@100&display=swap" rel="stylesheet"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.css"><link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap" rel="stylesheet"><link href="css/app.d30a452f.css" rel="preload" as="style"><link href="js/app.16c49f3d.js" rel="preload" as="script"><link href="js/chunk-vendors.d22fa5dc.js" rel="preload" as="script"><link href="css/app.d30a452f.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but celularprojeto doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.d22fa5dc.js"></script><script src="js/app.16c49f3d.js"></script></body></html>
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
resources/[carscripts]/mx_fixwiring/html/sound/1.ogg
Normal file
BIN
resources/[carscripts]/mx_fixwiring/html/sound/1.ogg
Normal file
Binary file not shown.
BIN
resources/[carscripts]/mx_fixwiring/html/sound/2.ogg
Normal file
BIN
resources/[carscripts]/mx_fixwiring/html/sound/2.ogg
Normal file
Binary file not shown.
0
resources/[carscripts]/mx_fixwiring/server/main.lua
Normal file
0
resources/[carscripts]/mx_fixwiring/server/main.lua
Normal file
Loading…
Add table
Add a link
Reference in a new issue