-
Sziasztok! Nem nagyon értem a triggerServer/ClientEvent-et és ezért probálkoztam egy ilyen scriptel:
Client:
local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientRender\", root,
function()
showCursor(true)
dxDrawRectangle(screenW * 0.3786, screenH * 0.3102, screenW * 0.2552, screenH * 0.5528, tocolor(0, 0, 0, 170), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.3731, screenW * 0.5448, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.3731, screenW * 0.5448, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3343, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) - 1, (screenW * 0.6339) - 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) - 1, (screenW * 0.6339) + 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) + 1, (screenW * 0.6339) - 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) + 1, (screenW * 0.6339) + 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", screenW * 0.3776, screenH * 0.3093, screenW * 0.6339, screenH * 0.3250, tocolor(255, 255, 255, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4269, screenW * 0.5448, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4269, screenW * 0.5448, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3880, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4824, screenW * 0.5448, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4824, screenW * 0.5448, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.4435, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Australia\", screenW * 0.4719, screenH * 0.3361, screenW * 0.5448, screenH * 0.3731, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Russia\", screenW * 0.4719, screenH * 0.3898, screenW * 0.5448, screenH * 0.4269, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Üres Slot\", screenW * 0.4719, screenH * 0.4454, screenW * 0.5448, screenH * 0.4824, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
end
)
-------------------------------------------------------Australia-------------------------------------------------------
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"australia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Russia-------------------------------------------------------
function dobozbaVan2(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan2(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"russia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Ures Slot-------------------------------------------------------
function dobozbaVan3(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan3(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"ures\", resourceRoot)
end
end
end
)
-------------------------------------------------------Semmmmmmmi xD YOLO-------------------------------------------------------
Server:
autralia = createTeam ( \"Australia\" )
russia = createTeam ( \"Russia\" )
function autralia ()
showCursor (false)
setPlayerTeam ( source, autralia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 110.14752, 1684.02576, 17.64063)
end
addEvent(\"australia\", true)
addEventHandler(\"australia\", australia)
function russia ()
showCursor (false)
setPlayerTeam ( source, russia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 914.36639, -996.83667, 38.13548)
end
addEvent(\"russia\", true)
addEventHandler(\"russia\", russia)
function ures ()
outputChatBox(\"#00007F[bL] #FFFFFFAz Üres Slot szerinted csak viccből van kiírva?...... #akkorisrányomsz....\", source)
end
addEvent(\"ures\", true)
addEventHandler(\"ures\", ures)
A válaszokat előre is köszönöm!
-
Sziasztok! Nem nagyon értem a triggerServer/ClientEvent-et és ezért probálkoztam egy ilyen scriptel:
Client:
local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientRender\", root,
function()
showCursor(true)
dxDrawRectangle(screenW * 0.3786, screenH * 0.3102, screenW * 0.2552, screenH * 0.5528, tocolor(0, 0, 0, 170), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.3731, screenW * 0.5448, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.3731, screenW * 0.5448, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3343, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) - 1, (screenW * 0.6339) - 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) - 1, (screenW * 0.6339) + 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) + 1, (screenW * 0.6339) - 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) + 1, (screenW * 0.6339) + 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", screenW * 0.3776, screenH * 0.3093, screenW * 0.6339, screenH * 0.3250, tocolor(255, 255, 255, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4269, screenW * 0.5448, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4269, screenW * 0.5448, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3880, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4824, screenW * 0.5448, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4824, screenW * 0.5448, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.4435, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Australia\", screenW * 0.4719, screenH * 0.3361, screenW * 0.5448, screenH * 0.3731, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Russia\", screenW * 0.4719, screenH * 0.3898, screenW * 0.5448, screenH * 0.4269, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Üres Slot\", screenW * 0.4719, screenH * 0.4454, screenW * 0.5448, screenH * 0.4824, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
end
)
-------------------------------------------------------Australia-------------------------------------------------------
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"australia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Russia-------------------------------------------------------
function dobozbaVan2(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan2(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"russia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Ures Slot-------------------------------------------------------
function dobozbaVan3(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan3(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"ures\", resourceRoot)
end
end
end
)
-------------------------------------------------------Semmmmmmmi xD YOLO-------------------------------------------------------
Server:
autralia = createTeam ( \"Australia\" )
russia = createTeam ( \"Russia\" )
function autralia ()
showCursor (false)
setPlayerTeam ( source, autralia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 110.14752, 1684.02576, 17.64063)
end
addEvent(\"australia\", true)
addEventHandler(\"australia\", australia)
function russia ()
showCursor (false)
setPlayerTeam ( source, russia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 914.36639, -996.83667, 38.13548)
end
addEvent(\"russia\", true)
addEventHandler(\"russia\", russia)
function ures ()
outputChatBox(\"#00007F[bL] #FFFFFFAz Üres Slot szerinted csak viccből van kiírva?...... #akkorisrányomsz....\", source)
end
addEvent(\"ures\", true)
addEventHandler(\"ures\", ures)
A válaszokat előre is köszönöm!
Mi a kérdés? Leírom neked a triggerek működését röviden.
-- Szerver oldal
function theTriggerFunction()
outputChatBox(\"valami kiválasztva\")
end
addEvent(\"ifSelected\", true) -- hozzáadjuk az eventet
addEventHandler(\"ifSelected\",getRootElement(), theTriggerFunction) -- kell hozzá egy handler is
-- Kliens oldal
function onClick()
if -- hova kattint -- then
triggerServerEvent(\"ifSelected\",localPlayer,localPlayer > kívánt hozzáadott változók) -- triggereljük, ezáltal megtörténik a szerveroldalon megadott funkcióban lévő cselekvés.
end
end
addEventHandler(\"onClientClick\", getRootElement(), onClick)
-
Oké, köszönöm, megprobálom ez alapján!
-
Én nem értek a luához, de az első gondolatom ez lenne:
function autralia ()
addEvent(\"australia\", true)
addEventHandler(\"australia\", australia)
Magyarul elírtad az event nevét. ;)
Ha más a hiba, akkor tovább nem tudok segíteni :shurg:
-
Bad Argument got Resource !!
(setPlayerTeam, spawnPlayer)
-
Bad Argument got Resource !!
(setPlayerTeam, spawnPlayer)
Pontos debugot küldj
-
Mostmár nem ír semmit, de szintúgy nem müködik :(
Dupla hozzászólás automatikusan összefûzve. ( 2016. augusztus 22. - 15:55:00 )
client:
local screenW, screenH = guiGetScreenSize()
addEventHandler(\"onClientRender\", root,
function()
showCursor(true)
dxDrawRectangle(screenW * 0.3786, screenH * 0.3102, screenW * 0.2552, screenH * 0.5528, tocolor(0, 0, 0, 170), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3343) - 1, (screenW * 0.4719) - 1, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.3731, screenW * 0.5448, screenH * 0.3731, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.3731, screenW * 0.5448, (screenH * 0.3343) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3343, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) - 1, (screenW * 0.6339) - 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) - 1, (screenW * 0.6339) + 1, (screenH * 0.3250) - 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) - 1, (screenH * 0.3093) + 1, (screenW * 0.6339) - 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", (screenW * 0.3776) + 1, (screenH * 0.3093) + 1, (screenW * 0.6339) + 1, (screenH * 0.3250) + 1, tocolor(0, 0, 0, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawText(\"Blue Gaming System CoD - CsapatVálasztó\", screenW * 0.3776, screenH * 0.3093, screenW * 0.6339, screenH * 0.3250, tocolor(255, 255, 255, 255), 0.80, \"pricedown\", \"center\", \"top\", true, true, false, true, false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.3880) - 1, (screenW * 0.4719) - 1, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4269, screenW * 0.5448, screenH * 0.4269, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4269, screenW * 0.5448, (screenH * 0.3880) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.3880, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawLine((screenW * 0.4719) - 1, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, (screenH * 0.4435) - 1, (screenW * 0.4719) - 1, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine((screenW * 0.4719) - 1, screenH * 0.4824, screenW * 0.5448, screenH * 0.4824, tocolor(0, 0, 0, 255), 1, false)
dxDrawLine(screenW * 0.5448, screenH * 0.4824, screenW * 0.5448, (screenH * 0.4435) - 1, tocolor(0, 0, 0, 255), 1, false)
dxDrawRectangle(screenW * 0.4719, screenH * 0.4435, screenW * 0.0729, screenH * 0.0389, tocolor(34, 45, 152, 255), false)
dxDrawText(\"Australia\", screenW * 0.4719, screenH * 0.3361, screenW * 0.5448, screenH * 0.3731, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Russia\", screenW * 0.4719, screenH * 0.3898, screenW * 0.5448, screenH * 0.4269, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
dxDrawText(\"Üres Slot\", screenW * 0.4719, screenH * 0.4454, screenW * 0.5448, screenH * 0.4824, tocolor(255, 255, 255, 255), 1.00, \"pricedown\", \"center\", \"center\", false, false, true, false, false)
end
)
-------------------------------------------------------Australia-------------------------------------------------------
function dobozbaVan(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"australia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Russia-------------------------------------------------------
function dobozbaVan2(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan2(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"russia\", resourceRoot)
end
end
end
)
-------------------------------------------------------Ures Slot-------------------------------------------------------
function dobozbaVan3(dX, dY, dSZ, dM, eX, eY)
if(eX >= dX and eX <= dX+dSZ and eY >= dY and eY <= dY+dM) then
return true
else
return false
end
end
addEventHandler(\"onClientClick\", getRootElement(), function(gomb, allapot, absX, absY)
if allapot == \"down\" and gomb == \"left\" then
if dobozbaVan3(screenW * 0.2599, screenH * 0.3685, screenW * 0.3005, screenH * 0.3917, absX, absY) then
triggerServerEvent ( \"ures\", resourceRoot)
end
end
end
)
-------------------------------------------------------Semmmmmmmi xD YOLO-------------------------------------------------------
server:
australia = createTeam ( \"Australia\" )
russia = createTeam ( \"Russia\" )
function australia ()
showCursor (source,false)
setPlayerTeam ( source, australia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 110.14752, 1684.02576, 17.64063)
end
addEvent(\"australia\", true)
addEventHandler(\"australia\",getRootElement(), australia)
function russia ()
showCursor (source,false)
setPlayerTeam ( source, russia )
fadeCamera(source, true)
setCameraTarget(source, source)
outputChatBox (\"#00007F[bL] #FFFFFFA(z) Australia csapatot választottad!\", source, 255,255,255, true)
spawnPlayer(source, 914.36639, -996.83667, 38.13548)
end
addEvent(\"russia\", true)
addEventHandler(\"russia\",getRootElement(), russia)
function ures ()
outputChatBox(\"#00007F[bL] #FFFFFFAz Üres Slot szerinted csak viccből van kiírva?...... #akkorisrányomsz....\", source)
end
addEvent(\"ures\", true)
addEventHandler(\"ures\",getRootElement(), ures)
-
Írd újra, és minden megírt funkció után nézd meg hogy működik e.
-
Oké, holnap megcsinálom.