Ciastkooo
Wiek: 41 Na forum: 4804 dni Posty: 78
Nick w MP: Ciastko
Piwa : 24
Zrobilem pelny kod ale tak to juz u mnie jest, bez bledow sie nie obejdzie
CLIENT:
GUIEditor = {
button = {},
window = {}
}
GUIEditor . window [ 1 ] = guiCreateWindow ( 481 , 309 , 654 , 434 , "Teleport Panel" , false )
guiWindowSetMovable ( GUIEditor . window [ 1 ], false )
guiWindowSetSizable ( GUIEditor . window [ 1 ], false )
guiSetAlpha ( GUIEditor . window [ 1 ], 1.00 )
guiSetVisible ( GUIEditor . window [ 1 ], false )
local fc = guiCreateButton ( 53 , 158 , 152 , 55 , "Fort Carson" , false , GUIEditor . window [ 1 ])
local lp = guiCreateButton ( 254 , 157 , 150 , 56 , "Las Paysadas" , false , GUIEditor . window [ 1 ])
local sl = guiCreateButton ( 448 , 158 , 139 , 55 , "Stare Lotnisko" , false , GUIEditor . window [ 1 ])
local ls = guiCreateButton ( 54 , 260 , 151 , 55 , "Los Santos" , false , GUIEditor . window [ 1 ])
local sf = guiCreateButton ( 256 , 260 , 148 , 55 , "San Fierro" , false , GUIEditor . window [ 1 ])
local lv = guiCreateButton ( 449 , 262 , 138 , 53 , "Las Venturas" , false , GUIEditor . window [ 1 ])
local bull = guiCreateButton ( 375 , 349 , 232 , 63 , "Bullet" , false , GUIEditor . window [ 1 ])
function xd ()
dxDrawText ( "Teleport" , 596 , 333 , 1015 , 404 , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "bankgothic" , "left" , "top" , false , false , true , false , false )
dxDrawText ( "BONUS :" , 555 , 642 , 809 , 705 , tocolor ( 255 , 255 , 255 , 255 ), 3.00 , "pricedown" , "left" , "top" , false , false , true , false , false )
end
function gui ()
if ( guiGetVisible ( GUIEditor . window [ 1 ]) == false ) then
guiSetVisible ( GUIEditor . window [ 1 ], true )
showCursor ( true )
addEventHandler ( "onClientRender" , getRootElement (), xd )
else
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
removeEventHandler ( "onClientRender" , getRootElement (), xd )
end
end
bindKey ( "F3" , "down" , gui )
function fort ()
outputChatBox ( "Przenios?e? si? do Fort Carson" , 255 , 0 , 0 , true )
triggerServerEvent ( "fort" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , fc , fort )
function las ()
outputChatBox ( "Przenios?e? si? do Las Paysadas" , 255 , 0 , 0 , true )
triggerServerEvent ( "las" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , lo , las )
function stare ()
outputChatBox ( "Przenios?e? si? na Stare Lotnisko" , 255 , 0 , 0 , true )
triggerServerEvent ( "stare" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , sl , stare )
function los ()
outputChatBox ( "Przenios?e? si? do Los Santos" , 255 , 0 , 0 , true )
triggerServerEvent ( "los" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , ls , los )
function san ()
outputChatBox ( "Przenios?e? si? do San Fierro" , 255 , 0 , 0 , true )
triggerServerEvent ( "san" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , san , sf )
function lasv ()
outputChatBox ( "Przenios?e? si? do Las Venturas" , 255 , 0 , 0 , true )
triggerServerEvent ( "lasv" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , lv , lasv )
function bullet ()
outputChatBox ( "Otrzymales auto o nazwie Bullet" , 255 , 0 , 0 , true )
triggerServerEvent ( "bullet" , getRootElement (), player )
end
addEventHandler ( "onClientGUIClick" , bull , bullet )
SERVER:
function fort ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "fort" , true )
addEventHandler ( "fort" , getRootElement (), fort )
function bullet ( thePlayer )
local x , y , z = getElementPosition ( source )
local bullet = createVehicle ( 562 , x , y , z )
warpPedIntoVehicle ( player , bullet )
if isPedInVehicle then
outputChatBox ( "Twoje auto zostanie usuniete po twoim wyjsciu z niego" , thePlayer )
end
addEvent ( "bullet" , true )
addEventHandler ( "bullet" , getRootElement (), bullet )
function las ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "las" , true )
addEventHandler ( "las" , getRootElement (), las )
function stare ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "stare" , true )
addEventHandler ( "stare" , getRootElement (), stare )
function los ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "los" , true )
addEventHandler ( "los" , getRootElement (), los )
function san ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "san" , true )
addEventHandler ( "san" , getRootElement (), san )
function lasv ( thePlayer )
setElementPosition ( thePlayer , - 192 , 1188 , 20 )
end
addEvent ( "lasv" , true )
addEventHandler ( "lasv" , getRootElement (), lasv )
Przenosi mnie do danego miejsca lecz wybucham O.o Jesli ktos znajdzie blad podajdzie gdzie on jest .