P.Wiśnia
Programista LUA
Wiek: 24 Na forum: 4045 dni Posty: 568
Nick w MP: P.Wiśnia
Piwa : 376
witam mam problem z zabieraniem prawojazdy
function zabieranie ( player , cmd , account , kate )
local account = getPlayerAccount ( source )
if getPlayerTeam ( player ) == getTeamFromName ( "Policja" ) then
setAccountData ( account , "kat" .. kate , false )
else
outputChatBox ( "Nie jeste? z polcji" , player , 255 , 255 , 255 , true )
end
end
addCommandHandler ( "zab.prawo" , zabieranie )
ale np to dzia?a
function sprawdzPrawoJazdy ( player , cmd , gracz )
if getPlayerTeam ( player ) == getTeamFromName ( "Policja" ) then
if gracz then
local gracz = getPlayerFromName ( gracz )
if gracz then
local account = getPlayerAccount ( gracz )
if account then
outputChatBox ( "Wybrany gracz: " .. getPlayerName ( gracz ).. "." , player , 240 , 240 , 240 , true )
local a = getAccountData ( account , "katA" )
if a == true then
ka = "Tak"
else
ka = "Nie"
end
local b = getAccountData ( account , "katB" )
if b == true then
kb = "Tak"
else
kb = "Nie"
end
local c = getAccountData ( account , "katC" )
if c == true then
kc = "Tak"
else
kc = "Nie"
end
outputChatBox ( "Kategoria A: " .. ka .. "." , player , 230 , 230 , 230 , true )
outputChatBox ( "Kategoria B: " .. kb .. "." , player , 230 , 230 , 230 , true )
outputChatBox ( "Kategoria C: " .. kc .. "." , player , 230 , 230 , 230 , true )
ka , kb , kc = false , false , false
end
else
outputChatBox ( "Taki gracz nie istnieje!" , player , 230 , 230 , 230 , true )
end
else
outputChatBox ( "Wpisz /prawo gracz" , player , 230 , 230 , 230 , true )
end
end
end
addCommandHandler ( "spr.prawo" , sprawdzPrawoJazdy )