Witam mam problem z prac? po stronie serwera mianowicie pr?buje zrobi? prac? polegaj?c? na za?adowaniu dostawczka, po czym mo?emy wywie?? towar.
Z grupsza ow? prac? napisa?em lecz mam problem z outputchatboxem oraz funkcjami niekt?rymi, gdy? wykonuj? one si? ka?demu graczowi, kt?ry posiada rozpocz?t? prac?.
Kod:
[lua]
--------------------------WYWOZ KONOPII
local marker1 = {}
local marker2 = {}
local marker3 = {}
local marker4 = {}
local marker5 = {}
local marker6 = {}
local marker7 = {}
local marker8 = {}
local marker9 = {}
local marker10 = {}
local pojazd = {}
local marker_praca = {}
local blip_praca = {}
addEvent("RozpocznijWywoz",true)
addEventHandler("RozpocznijWywoz",root,function()
--[[ if getElementData (source, "rozpoczeta") == true then return end
if getElementData (source, "oddaj") == true then return end
if getElementData (source, "nadruga") == true then return end
if getElementData (source, "natrzecia") == true then return end
if getElementData (source, "oddajdwa") == true then return end
if getElementData (source, "oddajtrzy") == true then return end
if getElementData (source, "oddalall") == true then return end
if getElementData (source, "dojazdlegalna") == true then return end
if getElementData (source, "dojazdnielegalna") == true then return end
]]...
Siemka mam pytanie, da si? jako? zrobi?
outputChatBox("**W?a?nie trwa napad w banku Palomino Creck**", plr, 255, 0, 0)
aby t? wiadomo?? wysy?a?o tylko do policji? **frakcje s? na ACL'U**
Witam przychodz? z pytaniem chc? odczyta? z bazy danych do outputChatBox
wyniki z bazy danych wszystko ?adnie lecz jest jeden problem odczytuje tylko jeden wynik a mam ich wi?cej + jak doda? limit by wy?wietla?o np max 10 linijek
Siema mam taki skrypt (wkleje czesc, nie calosc), aczkolwiek nie wyswietla sie wiadomosc zamieszczona w outputchatbox, jaka funkcja ma tam byc? source nie dziala, client tez itp.
addEvent("onParkingVehicleSpawn", true) addEventHandler("onParkingVehicleSpawn", root, function(id)
if not id then return end
local spawn=exports["pystories-vehicles"]:onRespawnVehicles(_,id,{ -2533.34, -23.63, 16.13, 0.0, 360.0, 90.0})
if spawn then
outputChatBox("✔ #FFFFFFPomy?lnie wyci?gna?e?(a?) pojazd z przechowalni.", el, 0, 255, 0, true) end
end)
Witam mam problem z outputChatBox'em w pewnej pracy. Jak zaczne prace to po prostu outputChatBox nie dziala... daje wam kawalek kodu moze cos wam uda sie wywnioskowac, dla czego nie ma tego outputChatBoxa.
Kod:
function nielegalna (theplayer)
if getElementData (theplayer, "oddalall") == true then
local pojazd = createVehicle (482, -1723.16,-85.07,3.68,359.2,0.2,132.6) warpPedIntoVehicle (theplayer, pojazd) setVehiclePlateText (pojazd, "DOSTAWCA") setVehicleColor (pojazd, 0, 0, 0) setElementData (pojazd, "vehicle:desc", "Praca NIE LEGALNA") addVehicleUpgrade (pojazd, 1025) setElementData (theplayer, "oddalall", false) setElementData (theplayer, "dojazdnielegalna", true) outputChatBox ("* Wybra?es prace nie legaln?! Udaj sie do pistoletu na mapie!", theplayer, 255, 255, 255) end
Witam. Wiem, ?e jest to na wiki i BARDZO PROSTA funkcja, ale nie dla mnie. Czy m?g?by mi kto? napisa? jak prawid?owo go uzupe?ni?? Chodzi mi bardziej takie o ACL czyli, je?eli gracz nie jest w jakie? grupie to mu si? wy?wietli tekst. Bardzo prosz? o pomoc i wyrozumia?o??.
Mam kod doda?em si? ?e gdy ACL PSP b?dzie otwiera?o bram? to wy?wietli im si? info ?e brama jest otwierana a chcia? bym jeszcze doda? ?e jak nie jeste? w ACL PSP i wpiszesz has?o to wyskoczy outputchatbox ?e nie znasz kodu na przyk?ad
function od ( thePlayer)
if isElementWithinMarker(thePlayer, bm) or isElementWithinMarker(thePlayer, bm2) then if isObjectInACLGroup ( "user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("PSP")) then
moveObject ( d, 2500, -2399.099609375, -99.7001953125, 36-7 ) setTimer(setPedAnimation, 1066.66, 1, thePlayer) setPedAnimation(thePlayer,kategoria_animacji,animacja,true,false,false) outputChatBox("#FF00FF[#5f5f5fInformacje#FF00FF]#000000*#5f5f5fBrama jest w trakcie otwierania !",thePlayer, 255, 0, 0, true) end
end
end
function PlayerLogin(username,password,checksave)
if not (username == "") then if not (password == "") then
local account = getAccount ( username,password )
if ( account ~= false ) then
logIn(source, account, password) setCameraTarget(source, source) outputChatBox ("Tekst") triggerClientEvent (source,"Zacznij",getRootElement()) end
end
end
end
addEvent("onRequestLogin",true) addEventHandler("onRequestLogin",getRootElement(),PlayerLogin)
I wiadomo?? "tekst" wy?wietlany jest na ca?y serwer jak mog? zmieni? by wy?wietla?a si? tylko osoby kt?ra wykona?a dan? funkcje?>
Zrobi?em sobie bardzo prosty skrypt na serwer kt?ry daje aparat po wpisaniu komendy ./aparat. Wszystko dzia?a?o ale chcia?em doda? sobie jeszcze outputchat box i po dodaniu skrypt nie dzia?a a w db3 wyskakuje taki b??d "...unexpected symbol near "?" "
Kod:
function aparta ( message,thePlayer ) giveWeapon(thePlayer, 43, 400, true) outputChatBox ( "Dosta?e? aparat z mo?liwo?ci? zrobienia 400 zdj??.", player, 255, 255, 255, true ) end
addCommandHandler("aparat", aparta)
Witam mam problem z kodem na prace. Chodzi mi o to ?e gdy wchodze w marker to ten wy?wietla mi podw?jn? wiadomo?? ( przy starcie skryptu wiadomo?? te? si? wy?wietla a nie mam tego tak ustawione) oraz nie niszczy si? tylko wy?wietla b??d.
function ladowanie (Player)
outputChatBox ( "#FF0000Rozpocze?e? prace rowo?enia burger?w. Twoim celem jest dostarczy? burgery do miejsca oznaczonego blipem na mapie", getRootElement(), 255, 255, 255, true)
destoryElement (ladowanie)
end
addEventHandler("onMarkerHit", getRootElement(), ladowanie)
Zapomnia?em doda? ?e gdy wjade w teren gdzie stoi marker robi si? niebieskie niebo