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

Wysłany: 2016-03-24, 22:46


marcello129

Jestem oszustem.






Wiek: 31
Na forum: 3869 dni
Posty: 30
Nick w MP: Hiio



Respekt: 50

Ostrzeżeń: 100%
Ot?? ,i? OurGame zosta?o udost?pnione . Postanowi?em par? skrypt?w obluka? // u?y? Znalaz?em tam skrypt na mechanika ,kt?ry mi si? przyda ale ,i? nieogarniam zabardzo .lua prosz?o pomoc
Kod:


local stanowiskaNaprawcze = {
stanowiskoDoherty={
mpos={-2050.52, 175.64, 28.84}, -- marker
cpos={-2056.70, 176.37, 28.00, 9.80, 5.50, 5.20}, -- cuboid
faction_id=1, -- (id) frakcja kt??ra b?™dzie mia?‚a dost?™p
text="Naprawa pojazdu"
},
}


Jak Zrobi? te
Kod:

faction_id=1, -- (id) frakcja kt??ra b?™dzie mia?‚a dost?™p

Czy da si? to przerobi? pod Acl mechanik by dzia?a?o ? Prosz? o odp

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-24, 22:48


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Ourgame jest pod mysql, nie acl, teorytycznie sie da, ale musialbys przebudowac gamemode :P

Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-24, 22:54


marcello129

Jestem oszustem.






Wiek: 31
Na forum: 3869 dni
Posty: 30
Nick w MP: Hiio



Respekt: 50

Ostrzeżeń: 100%
W?a?nie niebra?em ca?ego GM tylko poszczeg?lne skrypty jak tune mech, monta? ?wiate? , lakiernia itd . A je?eli ju? si? da to czy m?g?bym prosi? o zedytowanie tego kodu pod Acl Mechanik
Kod:



local stanowiskaNaprawcze = {
stanowiskoDoherty={
mpos={-2050.52, 175.64, 28.84}, -- marker
cpos={-2056.70, 176.37, 28.00, 9.80, 5.50, 5.20}, -- cuboid
faction_id=1, -- (id) frakcja kt??ra b?™dzie mia?‚a dost?™p
text="Naprawa pojazdu"
},
}


Podpis
SUPER SUPPORTER FORUM ;-; POLECAM .NANKY

http://m.imgur.com/mwagAN3,QKfbnjW,YWAKVZm
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-24, 22:57


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4838 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Tworzysz grup? acl : mechanikfc

Zmieniasz faction_id=1 na :
faction_id= "mechanikfc"

Przy rozpocz?ciu pracy (w tym kawa?ku kodu) dodajesz warunek kt?ry sprawdza czy gracz jest w tym acl :


Więcej informacji znajdziesz w Wikipedii MTA:

isObjectInACLGroup


Więcej informacji znajdziesz w Wikipedii MTA:

getAccountName


Więcej informacji znajdziesz w Wikipedii MTA:

getPlayerAccount


Podpis
Jedyny kontakt ze mną to PW forum

Kod:


local noobs = getElementsByTitle("player", "Programista LUA")
for k, v in ipairs(noobs) do
outputChatBox("Bez mózgu jest użytkownik o nicku: "..getPlayerName(v), root)
destroyElement(v)
end
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-25, 11:00


marcello129

Jestem oszustem.






Wiek: 31
Na forum: 3869 dni
Posty: 30
Nick w MP: Hiio



Respekt: 50

Ostrzeżeń: 100%
Totalnie tego nie ogarniam , je?eli kto? mi przerobi ten skrypt (2 kody) Dostaaje Zimneee :arrow: :piwo: :piwo: :piwo: :piwo:
Kod:

--[[
Resource: OURGame
Developers: Split <split.programista@gmail.com>
Copyright <split.programista@gmail.com> 2015-2016
You have no right to use this code without my permission.
]]

local isVehicles=nil
local isCzesci={
-- Nazwa tuningu, id czesci, cena
{"Spoiler Pro", 1000, 1500},
{"Spoiler Win", 1001, 2500},
{"Spoiler Drag", 1002, 3500},
{"Spoiler Alpha", 1003, 4500},
{"Spoiler Fury", 1023, 3500},
{"Wheels Offroad", 1025, 1000},
{"Spoiler Alien", 1049, 1500},
{"Spoiler X-Flow", 1050, 2000},
{"Wheels Shadow", 1073, 1500},
{"Wheels Mega", 1074, 1500},
{"Wheels Rimshine", 1075, 2000},
{"Wheels Wires", 1076, 2500},
{"Wheels Classic", 1077, 3500},
{"Wheels Twist", 1078, 2500},
{"Wheels Cutter", 1079, 3000},
{"Wheels Switch", 1080, 2000},
{"Wheels Grove", 1081, 4000},
{"Wheels Import", 1082, 3000},
{"Wheels Dollar", 1083, 2000},
{"Wheels Trance", 1084, 3000},
{"Wheels Atomic", 1085, 2700},
{"Stereo", 1086, 1000},
{"Hydraulics", 1087, 10500},
{"Wheels Ahab", 1096, 5500},
{"Wheels Virtual", 1097, 8500},
{"Wheels Access", 1098, 6500},
}

local wn={}
wn.window=guiCreateWindow(0.18, 0.19, 0.64, 0.62, "", true)
wn.grid=guiCreateGridList(0.03, 0.07, 0.62, 0.89, true, wn.window)
guiGridListAddColumn(wn.grid, "Nazwa(ID)", 0.5)
guiGridListAddColumn(wn.grid, "Koszt", 0.5)
wn.btn_submit=guiCreateButton(0.67, 0.08, 0.31, 0.33, "Zamontuj", true, wn.window)
wn.btn_close=guiCreateButton(0.67, 0.63, 0.31, 0.33, "Zdemontuj", true, wn.window)
guiSetVisible(wn.window, false)

addEventHandler("onClientMarkerHit", resourceRoot, function(el,md)
if not md or el~=localPlayer then return end
local cs=getElementData(source, "tn_cs")
if not cs then return end
local job=getElementData(source,"tn_faction")
local ljob=getElementData(el,"player:faction")
if job ~= ljob then
outputChatBox("* Nie jeste? zatrudniony w tym warsztacie.", 255, 0, 0)
return
end
local vehicles=getElementsWithinColShape(cs,"vehicle")
if #vehicles < 1 then
outputChatBox("* Na stanowisku monta?u nie ma ?adnego pojazdu.", 255, 0, 0)
return
end
if #vehicles > 1 then
outputChatBox("* Na stanowisku monta?u jest zbyt du?o pojazd?w.", 255, 0, 0)
return
end
if getElementHealth(vehicles[1]) < 900 then
outputChatBox("* Pojazd jest zbyt uszkodzony aby zamontowa? ?wiat?a.", 255, 0, 0)
return
end
isVehicles=vehicles[1]
showCursor(true,false)
guiGridListClear(wn.grid)
guiSetVisible(wn.window, true)
for i,v in ipairs(isCzesci) do
local row=guiGridListAddRow(wn.grid)
guiGridListSetItemText(wn.grid, row, 1, v[1].."("..v[2]..")", false, false)
guiGridListSetItemData(wn.grid, row, 1, v[2], false, false)
guiGridListSetItemText(wn.grid, row, 2, v[3].." Funt?w", false, false)
guiGridListSetItemData(wn.grid, row, 2, v[3], false, false)
end
end)

addEventHandler("onClientMarkerLeave", resourceRoot, function(el,md)
if el~=localPlayer then return end
isVehicles=nil
showCursor(false)
guiSetVisible(wn.window, false)
end)

addEventHandler("onClientGUIClick", wn.btn_submit, function()
if not isVehicles then return end
selectedRow=guiGridListGetSelectedItem(wn.grid) or -1
if selectedRow < 0 then return end
local model=guiGridListGetItemData(wn.grid, selectedRow, 1)
local cost=tonumber(guiGridListGetItemData(wn.grid, selectedRow, 2))
if not cost then return end
if cost > getPlayerMoney(localPlayer) then
outputChatBox("* Nie posiadasz tyle got?wki.", 255, 0, 0)
return
end
triggerServerEvent("takePlayerMoney", localPlayer, cost)
triggerServerEvent("montazElementu", root, isVehicles, "tuning", model, cost)
end)

addEventHandler("onClientGUIClick", wn.btn_close, function()
if not isVehicles then return end
selectedRow=guiGridListGetSelectedItem(wn.grid) or -1
if selectedRow < 0 then return end
local model=guiGridListGetItemData(wn.grid, selectedRow, 1)
local cost=tonumber(guiGridListGetItemData(wn.grid, selectedRow, 2))
if not model or not cost then return end
triggerServerEvent("montazElementu", root, isVehicles, "demtuning", model, cost/2)
end)

Kod:


--[[
Resource: OURGame
Developers: Split <split.programista@gmail.com>
Copyright <split.programista@gmail.com> 2015-2016
You have no right to use this code without my permission.
]]

local stanowiskaSwiatla = {
stanowiskoDoherty={
mpos={-2730.54, 217.73, 4.48}, -- marker
cpos={-2731.35, 214.37, 4.48-1.20, 13.30, 6.00, 5.20}, -- cuboid
faction_id=2, -- (id) frakcja kt?ra b?dzie mia?a dost?p
text="Montarz tuningu"
},
}

for i,v in pairs(stanowiskaSwiatla) do
v.cuboid=createColCuboid(unpack(v.cpos))
v.marker=createMarker(v.mpos[1], v.mpos[2], v.mpos[3]-0.60, "cylinder", 1.2, 0, 0, 255, 100)
setElementData(v.marker,"tn_faction",v.faction_id)
setElementData(v.marker,"tn_cs",v.cuboid)

t=createElement("text")
setElementData(t,"name",v.text)
setElementPosition(t,v.mpos[1], v.mpos[2], v.mpos[3])
end

:arrow: :piwo: :piwo: :piwo: :piwo:

[ Dodano: 2016-03-25, 11:02 ]
Oczywi?cie pod ACL Tuner

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-03-25, 12:45


mlodasnygo







Wiek: 16
Na forum: 3972 dni
Posty: 205

Piwa: 518

Respekt: 161,8
Respekt: 161,8Respekt: 161,8

Zaprasza i poleca
http://gtao.pl/prosby-o-p...,255.htm#649147
Magda Gessler :D lol lol

Podpis
600 dni - 10 marca 2017
:piwo: 500 piw :piwo: - 10 marca 2017
Postaw piwo autorowi tego posta
 

 
Tagi: faction
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Faction Id 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