Wysłany: 2013-06-22, 10:33
bronek1342
Wiek: 28 Na forum: 4808 dni Posty: 17
Witam ?ci?gn??em panel policji z neta i nie wiem co si? z nim dzieje po wrzuceniu na serwer sie nie w??cza prosz? o pomoc oto kod
Kod: GUIEditor_Window = {}
GUIEditor_Button = {}
GUIEditor_Edit = {}
GUIEditor_Grid = {}
GUIEditor_Window[1] = guiCreateWindow(7,207,270,372,"Panel Policji",false)
guiSetAlpha(GUIEditor_Window[1],1)
guiWindowSetMovable(GUIEditor_Window[1],false)
guiWindowSetSizable(GUIEditor_Window[1],false)
GUIEditor_Grid[1] = guiCreateGridList(33,56,133,242,false,GUIEditor_Window[1])
guiGridListSetSelectionMode(GUIEditor_Grid[1],2)
kolumna = guiGridListAddColumn(GUIEditor_Grid[1],"Gracze",0.6)
guiSetAlpha(GUIEditor_Grid[1],1)
GUIEditor_Button[1] = guiCreateButton(159,326,96,37,"Wyjd?",false,GUIEditor_Window[1])
GUIEditor_Button[2] = guiCreateButton(191,58,59,51,"Score",false,GUIEditor_Window[1])
GUIEditor_Button[3] = guiCreateButton(191,118,59,54,"Mandat",false,GUIEditor_Window[1])
GUIEditor_Edit[1] = guiCreateEdit(30,325,116,36,"",false,GUIEditor_Window[1])
guiEditSetMaxLength(GUIEditor_Edit[1],10)
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
function show(poli)
if getPlayerTeam(getLocalPlayer()) == getTeamFromName("Policja") then
guiGridListClear(GUIEditor_Grid[1])
for id, playeritem in ipairs(getElementsByType("player")) do
local row = guiGridListAddRow ( GUIEditor_Grid[1] )
guiGridListSetItemText ( GUIEditor_Grid[1], row, kolumna, getPlayerName ( playeritem ), false, false )
end
guiSetVisible(GUIEditor_Window[1], true)
showCursor(true)
end
end
bindKey ("m","down",show)
function down ()
if (source == GUIEditor_Button[1]) then
guiSetVisible(GUIEditor_Window[1], false)
showCursor(false)
guiGridListClear(GUIEditor_Grid[1])
end
end
addEventHandler("onClientGUIClick", GUIEditor_Button[1], down)
function mandat()
local mandat = guiGetText(GUIEditor_Edit[1])
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("mandat", getRootElement(), mandat,player)
outputChatBox("Gracz " .. player .. " otrzymal mandat w wysokosci " .. mandat .. "$ !", 255, 255, 0())
end
addEventHandler( "onClientGUIClick", GUIEditor_Button[3], mandat )
function score()
local score = guiGetText(GUIEditor_Edit[1])
local player = guiGridListGetItemText (GUIEditor_Grid[1], guiGridListGetSelectedItem (GUIEditor_Grid[1]), 1)
triggerServerEvent("score", getRootElement(), score,player)
outputChatBox("Gracz " .. player .. " otrzymal mandat w wysokosci " .. score .. " score !", 255, 255, 0() )
end
addEventHandler( "onClientGUIClick", GUIEditor_Button[2], score )
addCommandHandler("polip", show)
Wysłany: 2013-06-22, 14:12
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Sprawd? w konsoli, co po uruchomieniu serwera pisze..
Wysłany: 2013-06-22, 16:30
bronek1342
Wiek: 28 Na forum: 4808 dni Posty: 17
W?a?nie nic jak z debugowa?em skrypt to wyskakuje mi ?e
/m_c.lua:54")"expected near "("
Wysłany: 2013-06-22, 16:50
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
Podstaw LUA nie znasz? Poka? linijk? 54..
Wysłany: 2013-06-22, 17:09
bronek1342
Wiek: 28 Na forum: 4808 dni Posty: 17
Kod: outputChatBox("Gracz " .. player .. " otrzymal mandat w wysokosci " .. mandat .. "$ !", 255, 255, 0())
Wysłany: 2013-06-22, 19:43
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
outputChatBox ( "Gracz " .. player .. " otrzymal mandat w wysokosci " .. mandat .. "$ !" , 255 , 255 , 0 )
Tagi: policja :: panel
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: