Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2018-01-31, 08:03


Songo23







Wiek: 23
Na forum: 3047 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

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.

Za pomoc dam Zimne :piwo: :D

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 10:00


DaVeCS

Mapper






Wiek: 31
Na forum: 3386 dni
Posty: 193
Nick w MP: DaVe

Piwa: 59

Respekt: 70,5

Musisz spr?bowa? u?y? takiej funkcji:

    if getElementData(plr,"player:reputation") < 400 then
     outputChatBox("Nie posiadasz wymaganej ilo?ci punkt?w reputacji!\n\nBrakuje Ci "..400 getElementData(plr"player:reputation").." punkt?w!")
     return end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 10:03


Barcioo

Kiedyś to było ST






Wiek: 26
Na forum: 4049 dni
Posty: 458
Nick w MP: Bartek.

Piwa: 1887

Respekt: 460
Respekt: 460


if  getElementData(el,"nazwa reputacji ) <= 100 then  return end

dalsza kod

Podpis
Kanał Youtube;
A tu zapraszam
, pomogłem Ci? Wynagrodź mnie :piwo: :)


SUPPORT TEAM- 2016-09-03 do 2018-05-25
Test Mod- 2018-05-25
1k dni na Forum - 2018-01-28


GG: 62111935
Ostatnio zmieniony przez Barcioo 2018-01-31, 10:09, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 10:05


Nexisten

Moderator






Wiek: 22
Na forum: 4107 dni
Posty: 551
Nick w MP: Nexisten

Piwa: 1479

Respekt: 287,3
Respekt: 287,3Respekt: 287,3Respekt: 287,3

"Barcioo" napisał/a:


if  getElementData(el,"nazwa reputacji ) < 100 then else return end

dalsza kod


Poprawiam kod pana wy?ej.

if  getElementData(el,"nazwareputacji") < 100 then return end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 10:33


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8


local reputacja getElementData (zmienna_gracza"player:reputation") --je?eli sinie myletaka jest w OG-RPG

--tutaj masz funkcjmarkerowczy co?
if reputacja 100 then return end


Musisz zmieni? zmienn? gracza, gdy wczytujesz element-dat?.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 12:48


Songo23







Wiek: 23
Na forum: 3047 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:

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


Podpis
Aktualny projekt:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 12:59


Nexisten

Moderator






Wiek: 22
Na forum: 4107 dni
Posty: 551
Nick w MP: Nexisten

Piwa: 1479

Respekt: 287,3
Respekt: 287,3Respekt: 287,3Respekt: 287,3

"Songo23" napisał/a:

Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:

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(missionText2097.58,2223.98,11.02+1.2)
local zone createColCuboid2057.84741210942237.726318359410.711.25622061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.0246,2,0,0,0,0,0,275)
-- local m1 createMarker(-1922.67,573.14,34.45"cylinder"2.2969696)
local reputacja getElementData (el"player:reputation") --je?eli sinie myletaka jest w OG-RPG
local m1 createMarker(2097.58,2223.98,11.02-0.9"cylinder"1.2969696)
vehs = {}
local code "Google Ind."
veh_obj = {}
    if reputacja 100 then outputChatBox("Brakuje Ci "..100 getElementData(el"player:reputation").." punkt?w!") return  end

    end


Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 13:08


Songo23







Wiek: 23
Na forum: 3047 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

"vNeXxuS" napisał/a:

"Songo23" napisał/a:

Wszystko ?miga, ale gdy doda?em OutputChatBoxa to praca si? w og?le nie uruchamia. Wie kto? dlaczego?
Kod:

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(missionText2097.58,2223.98,11.02+1.2)
local zone createColCuboid2057.84741210942237.726318359410.711.25622061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.0246,2,0,0,0,0,0,275)
-- local m1 createMarker(-1922.67,573.14,34.45"cylinder"2.2969696)
local reputacja getElementData (el"player:reputation") --je?eli sinie myletaka jest w OG-RPG
local m1 createMarker(2097.58,2223.98,11.02-0.9"cylinder"1.2969696)
vehs = {}
local code "Google Ind."
veh_obj = {}
    if reputacja 100 then outputChatBox("Brakuje Ci "..100 getElementData(el"player:reputation").." punkt?w!") return  end

    end


Nadal nie dzia?a :/

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 13:48


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

if reputacja 100 then return outputChatBox("Brakuje Ci "..100 getElementData(el"player:reputation").." punkt?w!"end


Podpis

Kontakt
Discord: Qwertick#1210

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 14:15


Songo23







Wiek: 23
Na forum: 3047 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

Outputchatbox si? nie pojawia na czacie.


local missionText=createElement("text")
setElementData(missionText"name""Praca Dorywcza\nWygmagania:\n100RP\n Google Ind.")
setElementPosition(missionText2097.58,2223.98,11.02+1.2)
local zone createColCuboid2057.84741210942237.726318359410.711.25622061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.0246,2,0,0,0,0,0,275)
-- local m1 createMarker(-1922.67,573.14,34.45"cylinder"2.2969696)
local m1 createMarker(2097.58,2223.98,11.02-0.9"cylinder"1.2969696)
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)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 15:42


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Jakie? b??dy w /debugscript 3?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 16:03


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

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

Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 16:46


Songo23







Wiek: 23
Na forum: 3047 dni
Posty: 37
Nick w MP: Songo23

Piwa: 665

Respekt: 45,3

Takie co? mi si? pojawia w DB3:
Kod:

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(missionText2097.58,2223.98,11.02+1.2)
local zone createColCuboid2057.84741210942237.726318359410.711.25622061.98,2238.14,9.94,4.4,360.0,90.1)
createBlip(2097.58,2223.98,11.0246,2,0,0,0,0,0,275)
-- local m1 createMarker(-1922.67,573.14,34.45"cylinder"2.2969696)
local reputacja getElementData (el"player:reputation") --je?eli sinie myletaka jest w OG-RPG
local m1 createMarker(2097.58,2223.98,11.02-0.9"cylinder"1.2969696)
vehs = {}
local code "Google Ind."
veh_obj = {}
if reputacja 100 then return outputChatBox("Brakuje Ci "..100 getElementData(el"player:reputation").." punkt?w!",elend


Podpis
Aktualny projekt:
Postaw piwo autorowi tego posta
 

 
Wysłany: 2018-01-31, 16:50


Kalizman







Wiek: 23
Na forum: 3651 dni
Posty: 1394

Piwa: 4619

Respekt: 358,8
Respekt: 358,8Respekt: 358,8Respekt: 358,8Respekt: 358,8

Nie jestem pewny ale u?yj tonumber

Postaw piwo autorowi tego posta
 

 
Tagi: jak :: zrobić :: wymagania :: dot. :: pracy?
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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
Dodaj temat do Ulubionych
Wersja do druku