Cze??, mam problem z pewnym skryptem, odpalam i marker si? nie pojawia w og?le nie dzia?a.
Server:
[lua]
local mark = createPickup(1540.06873, -1674.80566, 9838.55469,3, 1275, 1)
setElementInterior(mark, 6)
addEventHandler("onPickupHit",mark,
function(player)
local accName = getAccountName ( getPlayerAccount ( player ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
triggerClientEvent(player, "startGGPol", root, player)
end
end
)
addEvent("przebierzPol", true)
addEventHandler("przebierzPol",root,
function(model)
local skin = getElementModel(source)
local gracz = getPlayerName(source)
local nick = getPlayerFromName(gracz)
local acc = getPlayerAccount(nick)
local accName = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
if getAccountData(acc,"PracaPol") == false then
setAccountData(acc,"starySkinPol", skin)
setElementModel(source, model)
setAccountData(acc,"PracaPol", true)
outputChatBox("#FF0036[#919191Policja#FF0036]#919191Rozpoczynasz s?u?be",source,255,255,255,true)
toggleControl(source,"fire",true)
toggleControl(source,"aim_weapon",true)
toggleControl(source,"action", true)
else
outputChatBox("#FF0036[#919191Polic...
Witam mam problem, ot?? nie wiem czy da si? w og?le zrobi? takie co?, ?e po wzi?ciu pracy nie da si? otworzy? Panelu Freeroam f1. a je?li si? da to w jaki spos?b? Pr?bowa?em tego lecz nie dzia?a, debugscript 3 nic nie pokazuje.
Witam mam problem gdy wykonam prace nie wyp?aca mi kasy , pr?bowa?em szuka?em na forum rozwi?zania ale nie uda?o si?.
Kod z strony serwera
[code]
addEvent("givePlayerMoney", true)
addEventHandler("givePlayerMoney", resourceRoot, function(m)
if tonumber(m) then
givePlayerMoney(client, m)
end
end)
addEventHandler("onMarkerHit", wejscie, function(el, md)
if isPedInVehicle(el) then return end
setElementDimension(el, 0)
setElementPosition(el, -2073.52,275.39,36.35)
end)
addEventHandler("onMarkerHit", wyjscie, function(el, md)
if isPedInVehicle(el) then return end
setElementDimension(el, 0)
setElementPosition(el, -2040.26,356.36,67.25)
end)
[/code]
Kod z strony clienta
[code]
local praca = createMarker(-2049.55,343.55,67.29-0.8, "cylinder", 2.0, 255, 0, 0, 0)
addEventHandler("onClientMarkerHit", praca, function(el, md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox("*...
Witam, chcialbym sie zapytac was jak zrobic by
1. Po dojechaniu do ostatniego markera teleportowalo nas na miejsce rozpoczecia pracy ( Kordy : -1998.69, 70.68, 28.62.)
Oraz kolejne :
2. Zeby pokazywalo nam blipem gdzie mamy kolejny marker (czyli jak np zdaje sie prawo jazdy, to tam na mini mapce lub tez na F11 sa zaznaczone te markery blipem i wlasnie o to was prosze)
Z gory wielkie Dziekuje!!
function removePreviousVehicles(plr)
for i,v in ipairs(getElementsByType("vehicle", resourceRoot)) do
local sby = getElementData(v, "zrespilGracz")
if sby and sby == plr and getPedOccupiedVehicle(plr) ~= v then
destroyElement(v)
end
end
end
addEventHandler("onMarkerHit", m1, function(el, md)
if getElementData(el, "zrespilGracz") then
outputChatBox("[Informacja] Praca w trakcie poprawek", el)
return
end
if not md or getElementType(el) ~= "player" or getPedOccupiedVehicle(el) then return end
local x,y,z = getElementPosition(el)
local bus = createVehicle(572, x,y,z,-1992.3388671875, 75.3896484375, 27.813388824463)
opis = guiCreateMemo(9, 25, 389, 365, "Praca polega na dowo?eniu paliwa na stacji poprzez wydobycie i za?adowanie do auta ropy, prze?adunek ropy z samochodu do poci?gu, przew?z paliwa poci?giem do Koncernu Naftowego, ponowny przyjazd do zbiornika z rop? i przew?z przerobionej ropy na benzyne do stacji paliw. Za jeden taki kurs dostaje si? od 90 do 110 $, a tak?e wzbogaca si? dystrybutor z paliwem od 150 do 300 litr?w paliwa.", false, okno)
guiMemoSetReadOnly(opis, true)
btnzat = guiCreateButton(11, 405, 387, 59, "Zatrudnij si?", false, okno)
btnzwol = guiCreateButton(11, 483, 387, 63, "Zwolnij si?", false, okno)
zamknij = guiCreateButton(347, 564, 51, 20, "X", false, okno)
guiSetVisible(okno, false)
function showGUI(hitElement)
if getElementType(hitElement) == "player" and (hitElement == localPlayer) then
if not guiGetVisible(okno) then
if not getPedOccupiedVehicle(localPlayer) then
guiSetVisible(okno, true)
showCursor(tr...
Witam!
Chcia?bym Wam przedstawi? System prac By Stw0reK, kt?ry napisa?em z nud?w System prac mia? przypomina? ten z serwer?w typu tokyo.
Do podanych ju? prac typu: fbi, policjan, medyk, stra?ak itp. zosta?a dodana praca dziwki
Komendy skyptu:
Chcia?bym Ulepszy? Skrypt poprzez Dodanie pieni?dzy i Exp za czas sp?dzony w na Serwerze naprzyk?ad lub Wynagrodzenie Pieni??ne za GOdzine w Pracy naprzyk??d 100$. Mo?e kto? pom?c mi w tym ?
Witam m?j problem polega na tym jak zrobi? ograniczenie do logowanie teamu np. Chcia?bym ?eby tylko mog?o 5 osob si? zalogowa? na serwie a jak si? zaloguje to np jedna wyjdzie z serwa to ?eby mog?a zalogowa? si? za nia.
Jakich funkcji u?y? itp
Kod:
fc = createTeam ( "Warsztat Los Santos", 999, 333, 0 ) pickupeq = createPickup ( -278.10000610352, 1449.3000488281, 1084.4000244141 , 3,1277, 1 ) setElementInterior ( pickupeq, 4 ) setElementData(pickupeq,"message","Logowanie do Warsztatu Fort Carson")
function ls1 ( thePlayer ) local playerName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Cywile" ) ) then
setPlayerTeam ( thePlayer, fc ) setElementModel ( thePlayer, 50 ) outputChatBox( "Szef: Zacz??e? prace, a teraz do roboty!",thePlayer, 225,0,0)
else
outputChatBox( "Nie jeste? pracownikiem warsztatu, a wi?c nie mo?esz si? zalogowa? do frakcji!", getRootElement(),225,0,0) end
end
addEventHandler ( "onPickupHit", pickupeq, ls1 )
Witam serdecznie, podam cze?? kodu, kt?ry to ukazuje, ?e jak dojedziemy tirem do miejsca to niszczy nam tira, daje kas? itd. Chodzi o to, czy zrobi?em co? ?le ze spawnem? Bo chcia?bym zrobi?, tak, ?e jak ju? dojad? to niszczy tira tak jak jest dotychczas, a potem teleportuje mnie do kord?w kt?re tam wpisa?em.