Witam!
Chcia?bym zrobi? wymagania dotycz?ce pracy. Chodzi mi o to, aby zwyk?y gracz z 0 RP nie m?g? rozp?cz?? pracy, ale taki kt?ry ma ju? 100 RP m?g?. Serwer jest na OG-RPG.
local reputacja = getElementData (zmienna_gracza, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
--tutaj masz funkcj? markerow? czy co?
if reputacja < 100 then return end
Musisz zmieni? zmienn? gracza, gdy wczytujesz element-dat?.
Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then return end
outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!")
return
end
Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then return end
outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!")
return
end
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!") return end
end
Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then return end
outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!")
return
end
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!") return end
end
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then return outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!") end
[ Dodano: 2018-01-31, 14:21 ]
Jednak ani nie mo?na pracowa? gdy mam 100rp, ani nie pojawia si? komunikat na czacie, a marker itp jest. (kod juz wy?ej wysy?a?em)
if reputacja < 100 then return outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!",231,217,176,true) end
[ Dodano: 2018-01-31, 16:04 ]
no chyba ze to jest server side to
if reputacja < 100 then return outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!",el) end
ERROR: [Prace]/sg-sv/bus.lua:12 attemt to compare boolean with number.
M?j kod:
local missionText=createElement("text")
setElementData(missionText, "name", "Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText, 2097.58,2223.98,11.02+1.2)
local zone = createColCuboid( 2057.8474121094, 2237.7263183594, 10.7, 11.25, 6, 22061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.02, 46,2,0,0,0,0,0,275)
-- local m1 = createMarker(-1922.67,573.14,34.45, "cylinder", 2.2, 96, 96, 96)
local reputacja = getElementData (el, "player:reputation") --je?eli si? nie myle, taka jest w OG-RPG
local m1 = createMarker(2097.58,2223.98,11.02-0.9, "cylinder", 1.2, 96, 96, 96)
vehs = {}
local code = "Google Ind."
veh_obj = {}
if reputacja < 100 then return outputChatBox("Brakuje Ci "..100 - getElementData(el, "player:reputation").." punkt?w!",el) end
Nie możesz pisać nowych tematów Nie możesz odpowiadać w tematach Nie możesz zmieniać swoich postów Nie możesz usuwać swoich postów Nie możesz głosować w ankietach