GTA Közösség - A magyar GTA fórum
Multi Theft Auto (MTA) => MTA: Szerverfejlesztés => Archívum => A témát indította: Juhander - 2014. Augusztus 13. - 10:48:10
-
Hali. Csináltam egy telefon scriptet viszont azthiszem mindent jól megirtam ,de nem ugrik elő sehogyse a mobil.
Script.lua
function telefon1 ()
screenwidth, screenHeight = guiGetScreenSize
WindowWidth, windowleight = 390, 707
x = (screenWidth/2) - (windowWidth/2)
y = (screenHeight/2) - (windowHeight/2)
telefon = guiCreateStaticImage (x, y, 390, 707, \"phone_main.png\", false)
end
addCommandHandler (\"telefon1\", telefon1)
[/quote]
Meta.xml
<meta>
<info author=\"juhander\" version=\"1.0\" type=\"script\"/>
<script src=\"script.lua\" type=\"client\"/>
<file src=\"phone_main.png\" type=\"client\"/>
</meta>
[/quote]
Kezdő scripter vagyok szóval :D úgy nézzetek rám
-
function telefon1 ()
screenwidth, screenHeight = guiGetScreenSize
WindowWidth, windowleight = 390, 707
x = (screenWidth/2) - (windowWidth/2)
y = (screenHeight/2) - (windowHeight/2)
telefon = guiCreateStaticImage (x, y, 390, 707, \"phone_main.png\", false)
end
addCommandHandler (\"telefon1\", telefon1)
[/quote]
Edit: pirossal bejelöltem neked a hibákat :D
-
őő látom ,hogy kihúztad pirossal ,de semmi különbséget nemlátok xd
-
Rossz:
screenwidth, screenHeight = guiGetScreenSize
WindowWidth, windowleight = 390, 707
[/quote]
Jó:
screenWidth, screenHeight = guiGetScreenSize()
windowWidth, windowHeight = 390, 707
[/quote]
Szerintem így már észreveszed :D
Edit: találtam még 1 \"elírást\"
Edit2: találtam még 1 \"elírást\" xD
-
átjavitottam ,de sajnos igy se megy. Elinditom ,de a /telefon1 -el nem dobja ki :(
Dupla üzenet összevonva ekkor: 2014. Augusztus 13. - 21:47:40
function telefon1 ()
screenWidth, screenHeight = guiGetScreenSize ()
windowWidth, windowHeight = 300, 400
x = (screenWidth/2) - (windowWidth/2)
y = (screenHeight/2) - (windowHeight/2)
hatter = guiCreateStaticImage (x, y, 260, 471, \"phone_main.png\", false)
showCursor(true)
gomb1 = guiCreateLabel(93, 237, 34, 34, \"AAAAAA\", false, hatter)
addEventHandler(\"onClientGuiClick\", gomb1, gombteszt, false)
end
addCommandHandler (\"telefon1\", telefon1)
function gombteszt()
outputChatBox ( \"Sikeresen elinditottad a Flappy Bird-ot\" )
end
[/quote]
Na most az van ,hogy elindul ,de ez a mondat nem urgik ki amikor rámegyek az \"AAAA\"-ra
-
Egyszerűbb lenne ha használnád a /debugscript 3 parancsot, és megosztanád velünk milyen errort kapsz.
-
Beirtam ,hogy /debugscript 3 viszont semmit nem dob ki az ég világon. mondjuk azt se tudom ,hol kellene valamit kidobnia :D
-
[mod]Elavult, zárom.[/mod]