Wysłany: 2013-01-13, 23:56
pidbulxd
Wiek: 28 Na forum: 5230 dni Posty: 135
Nick w MP: Word
Piwa : 540
Witajcie !
Dodaje do panelu policji funkcje 'Sprawdz Upomnienie' i 'Daj Upomnienie'.
Funkcja sprawd?, dzia?a poprawnie. Ale z funkcj? dawania, jest gorzej.
Funkcja na dawanie upomnienia:
Client:
function sprupomnie ()
local player = guiGridListGetItemText ( GUIEditor . gridlist [ 1 ], guiGridListGetSelectedItem ( GUIEditor . gridlist [ 1 ]), 1 )
if player ~= "" then
triggerServerEvent ( "sprupomnienie" , getRootElement (), getLocalPlayer (), player )
end
end
Server:
function dajupo ( player )
local gracz = getPlayerFromName ( player )
local konto1 = getPlayerAccount ( player )
local upo = getAccountData ( konto , "upomnienie" )
if ( upo == false ) then
setAccountData ( konto , "upomnienie" , "dosta?" )
outputChatBox ( "Gracz " .. player .. " otrzyma? upomnienie." , source , 255 , 255 , 255 )
end
end
addEvent ( "upomnienie" , true )
addEventHandler ( "upomnienie" , getRootElement (), dajupo )
Za pomoc piwko ! Z g?ry dzi?ki, Wordu
Wysłany: 2013-01-14, 11:36
Riot
3X
Wiek: 29 Na forum: 5729 dni Posty: 1123
Nick w MP: Riot/3X
Piwa : 286
triggerServerEvent ( "sprupomnienie" , getRootElement (), getLocalPlayer (), player )
addEvent ( "upomnienie" , true )
addEventHandler ( "upomnienie" , getRootElement (), dajupo )
Liter?wka Ci si? wkrad?a.
Wysłany: 2013-01-14, 13:23
pidbulxd
Wiek: 28 Na forum: 5230 dni Posty: 135
Nick w MP: Word
Piwa : 540
Ziomek11 , nie ten kod wklei?em. Moja pomy?ka. Problem ju? naprawi?em, mo?na zamkn??
Tagi: upomnienie
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: