mommytellme Posted March 24, 2014 Share Posted March 24, 2014 Cześć! Niestety, witam Was z kolejnym, nowym problemem Problem polega na tym że chciałem zrobić teleportujące budki telefoniczne, póki co na komendę. Skrypt wygląda tak: GUIEditor = { button = {}, window = {} } function otworzgui () okienko = guiCreateWindow(579, 20, 221, 487, "Teleportujące budki", false) guiWindowSetSizable(okienko, false) sfd = guiCreateButton(28, 29, 171, 15, "San Fierro Downdown", false, okienko) gs = guiCreateButton(28, 44, 171, 15, "Grove Street", false, okienko) showCursor(true) end function grovestreet ( player ) if source == gs then spawnPlayer ( player, 2506, -1661, 13 ) end end addCommandHandler("otworz", otworzgui) addEventHandler("onClientGUIClick", getRootElement(), grovestreet) Aczkolwiek kliknięcie Grove Street nic nie daje. Debugscript 3 po kliknięciu Grove Street: Error: budki/skrypt.lua:20: attempt to call global 'spawnPlayer' (a nil value) Pomoże ktoś? Link to comment
WhoAmI Posted March 24, 2014 Share Posted March 24, 2014 GUIEditor = { button = {}, window = {} } okienko = guiCreateWindow(579, 20, 221, 487, "Teleportujące budki", false) guiWindowSetSizable(okienko, false) guiSetVisible ( okienko, false ) sfd = guiCreateButton(28, 29, 171, 15, "San Fierro Downdown", false, okienko) gs = guiCreateButton(28, 44, 171, 15, "Grove Street", false, okienko) addEventHandler("onClientGUIClick", getRootElement(), grovestreet) function grovestreet ( player ) if source == gs then setElementPosition ( localPlayer, 2506, -1661, 13 ) end end addCommandHandler( "otworz", function ( ) guiSetVisible ( not guiGetVisible ( okienko ) ) showCursor ( not isCursorShowing ( ) ) end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now