Wysłany: 2012-03-24, 21:13
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Witam robi? na pocz?tek panel salonu .
Mam ju? funkcje do tworzenia auta :
CreateVehicle - Kod: createVehicle ( int model, float x, float y, float z, [float rx, float ry, float rz, string numberplate, bool bDirection, int variant1, int variant2] )
takePlayerMoney
Kod: takePlayerMoney ( who, 300 )
Kod: [b]givePlayerMoney [/b]
givePlayerMoney ( source, 300 )
Gui:
Kod: GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}
GUIEditor_Window[1] = guiCreateWindow(223,142,415,570,"Panel Salon by luki123",false)
GUIEditor_Grid[1] = guiCreateGridList(13,22,191,460,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GUIEditor_Grid[2] = guiCreateGridList(211,25,195,457,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[2],2)
GUIEditor_Button[1] = guiCreateButton(15,501,185,42,"Daj Auto",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(211,502,195,39,"Wyjdz",false,GUIEditor_Window[1])
Opis: chce ?eby by?a lista tak jak ka?dy panel i button "Daj Auto" i jak si? da auto to ?eby ,gracz by? ju? w aucie
Elementy w gui.
Clinet
2gridlisty-gracz,auta
button "Daj Auto"
Serwer
Funkcja
createVehicle
givePlayerMoney
takePlayerMoney
Ostatnio zmieniony przez luki123luki123 2012-03-24, 21:21, w całości zmieniany 1 raz
Wysłany: 2012-03-24, 21:17
Jacob
Głupiomądry
Wiek: 28 Na forum: 5502 dni Posty: 967
Nick w MP: Jacob
Piwa : 786
luki123luki123 , stw?rz ca?y kod i nam daj to pomo?emy.
Wysłany: 2012-03-25, 11:38
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Ale jakie funkcji mam u?y? jeszcze
Na szybko :
Kod: --------------------------------okna
GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Grid = {}
GUIEditor_Window[1] = guiCreateWindow(223,142,415,570,"Panel Salon by luki123",false)
GridList1= guiCreateGridList(13,22,191,460,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
GridList2= guiCreateGridList(211,25,195,457,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[2],2)
Button1= guiCreateButton(15,501,185,42,"Daj Auto",false,GUIEditor_Window[1])
Button2= guiCreateButton(211,502,195,39,"Wyjdz",false,GUIEditor_Window[1])
--------------------------------/okna
--------------------------------zmienne
local team = getTeamFromName("Salon")
--------------------------------/zmienne
--------------------------------funkcej
function show()
if getPlayerTeam(getLocalPlayer()) == team then
local column = guiGridListAddColumn( GridList1, "Player", 0.99 )
local column1 = guiGridListAddColumn( GridList2, "Auto", 0.99 )
if ( column ) then
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GridList1 )
guiGridListSetItemText ( GridList1, row, column, getPlayerName ( playeritem ), false, false )
end
for key,createVehicle in pairs(Vehicle) do
local row1 = guiGridListAddRow ( GridList2 )
guiGridListSetItemText ( GridList2, row1, 1, createVehicle, false, false )
end
end
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
function wyjdz()
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
end
function daj()
local player = guiGridListGetItemText (GridList1, guiGridListGetSelectedItem (GridList1), 1)
local co = guiGridListGetItemText (GridList2, guiGridListGetSelectedItem (GridList2), 1)
triggerServerEvent("daj", getRootElement(), player, getLocalPlayer())
end
--------------------------------/funkcje
------------------------------handlery
addEventHandler( "onClientGUIClick", Button1, daj )
addEventHandler( "onClientGUIClick", Button2, wyjdz )
addCommandHandler("pogop", show)
------------------------------/handlery
[ Dodano : 2012-03-26, 14:40 ]
Jak mam zrobi? serwer i auta ?eby by?y w nowym pliku xml
[ Dodano : 2012-03-26, 20:16 ]
Kod: <auto koszt="50000" >445</auto>
<auto koszt="160000" >541</auto>
<auto koszt="170000" >480</auto>
<auto koszt="200000" >562</auto>
<auto koszt="180000" >565</auto>
<auto koszt="190000" >434</auto>
<auto koszt="210000" >494</auto>
<auto koszt="250000" >411</auto>
<auto koszt="140000" >559</auto>
<auto koszt="220000" >560</auto>
Wysłany: 2012-03-27, 18:23
Paweł509
Wiek: 29 Na forum: 5215 dni Posty: 11
Ej ja z 2 konta pisze mo?e kto? mi pomo?e bo dalej nie ummie
Wysłany: 2012-03-27, 18:48
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
Tagi: panel :: pogo :: salonu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: