Wysłany: 2017-07-28, 13:40
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Witam, napisa?em skrypt, Jenak problem jest taki, gdy? jak ktos wjdzie w marker to teleportuje go z wozem co zrobic?
-------- WEJSCIE / WYJSCIE DO KASYNA ------------
local markerwej = createMarker ( 2089.7099609375 , 1451.3182373047 , 11.4203125 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
local markerwyj = createMarker ( 1133 ,- 15.2 , 1001.2796875 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
setElementInterior ( markerwyj , 12 )
local idinteriorwej = 12
local x , y , z = 1132.9450 ,- 8.6750 , 1000.6800
function interior ( source )
setElementInterior ( source , idinteriorwej )
setElementPosition ( source , x , y , z )
end
addEventHandler ( "onMarkerHit" , markerwej , interior , false )
local idinteriorwyj = 0
local x , y , z2 = 2135.66064 , 1453.90540 , 10.82031
function wyjsciezinterioru ( source )
setElementInterior ( source , idinteriorwyj )
setElementPosition ( source , x , y , z2 )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjsciezinterioru , false )
----------------- KOMUNIKAT KASYNA WEJ / WYJ -----------------------
function wejscienapis ( source )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #00FF1EWitaj w Las Venturas Casino, grasz i pijesz na w?asn? odpowiedzialno??!" , getRootElement (), 255 , 0 , 0 , true )
end
addEventHandler ( "onMarkerHit" , markerwej , wejscienapis )
function wyjscienapis ( source )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #FF0033Mamy nadziej?, ?e wr?cisz do nas jak tylko uda ci si? zdoby? got?wk?!" , getRootElement (), 255 , 0 , 0 , true )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjscienapis )
Ostatnio zmieniony przez Emm 2017-07-28, 17:53, w całości zmieniany 2 razy
Wysłany: 2017-07-28, 14:01
Avenged
Młodszy Szkrypter
Wiek: 23 Na forum: 3510 dni Posty: 654
Nick w MP: Avenged
Piwa : 1570
Tutaj masz b??d zamiast source powinno by? localPlayer
----------------- KOMUNIKAT ? KASYNA ? WEJ / WYJ -----------------------
function? wejscienapis ?( localPlayer )
??? outputChatBox ?(? "[#FFFFFFKASYNO#FF0033]?#00FF1EWitaj?w?Las?Venturas?Casino,?grasz?i?pijesz?na?w?asn??odpowiedzialno??!" ,? getRootElement (),? 255 ,? 0 ,? 0 ,? true ?)
end
addEventHandler ?(? "onMarkerHit" ,? markerwej ,? wejscienapis )??
function? wyjscienapis ?( localPlayer )
??? outputChatBox ?(? "[#FFFFFFKASYNO#FF0033]?#FF0033Mamy?nadziej?,??e?wr?cisz?do?nas?jak?tylko?uda?ci?si??zdoby??got?wk?!" ,? getRootElement (),? 255 ,? 0 ,? 0 ,? true ?)
end
addEventHandler ?(? "onMarkerHit" ,? markerwyj ,? wyjscienapis )?
Podpis
LUA, JS, PHP
Zapraszam do skorzystania z moich usług: Klik
Wysłany: 2017-07-28, 15:41
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Nadal nie dzia?? to jest plik serwerowy
[ Dodano : 2017-07-28, 15:41 ]
BarteQ03 , up
Wysłany: 2017-07-28, 16:05
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
--------------------- BLIP / maszyny ---------------------------
createBlip ( 2138.8347167969 , 1461.6405029297 , 31.171875 , 21 , 2 , 0 , 0 , 0 , 255 , 0 , 200 )
local maszyna1 = createMarker ( 1135.14893 , - 4.11091 , 999.70000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna1 , 12 )
local maszyna2 = createMarker ( 1132.75142 , - 1.72544 , 999.70000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna2 , 12 )
local maszyna3 = createMarker ( 1134.88879 , 0.87846 , 999.70000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna3 , 12 )
local maszyna4 = createMarker ( 1124.90320 , 2.76121 , 999.70000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna4 , 12 )
local maszyna5 = createMarker ( 1128.00220 , 2.76121 , 999.7000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna5 , 12 )
local maszyna6 = createMarker ( 1119.13000 , - 3.31732 , 999.7000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna6 , 12 )
local maszyna7 = createMarker ( 1119.13000 , 0.19284 , 999.7000 , "cylinder" , 1.0 , 255 , 0 , 0 , 100 )
setElementInterior ( maszyna7 , 12 )
-------- WEJSCIE / WYJSCIE DO KASYNA ------------
local markerwej = createMarker ( 2089.7099609375 , 1451.3182373047 , 11.4203125 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
local markerwyj = createMarker ( 1133 ,- 15.2 , 1001.2796875 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
setElementInterior ( markerwyj , 12 )
local idinteriorwej = 12
local x , y , z = 1132.9450 ,- 8.6750 , 1000.6800
function interior ( source )
setElementInterior ( source , idinteriorwej )
setElementPosition ( source , x , y , z )
end
addEventHandler ( "onMarkerHit" , markerwej , interior , false )
local idinteriorwyj = 0
local x , y , z2 = 2135.66064 , 1453.90540 , 10.82031
function wyjsciezinterioru ( source )
setElementInterior ( source , idinteriorwyj )
setElementPosition ( source , x , y , z2 )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjsciezinterioru , false )
----------- DOTATKOWE MASZYNY OB ...------------
local maszynaustaw6 = createObject ( 2640 , 1118.18503 , 0.11281 , 1000.69519 , 0 , 0 , 90 )
setElementInterior ( maszynaustaw6 , 12 )
local maszynaustaw7 = createObject ( 2640 , 1118.18503 , - 3.38932 , 1000.69519 , 0 , 0 , 90 )
setElementInterior ( maszynaustaw7 , 12 )
-------- PED -------------------
local ped = createPed ( 189 , 1141.30042 , - 8.28596 , 1000.67188 , 90.0 )
setElementInterior ( ped , 12 )
local ped2 = createPed ( 189 , 1141.30042 , 0.36442 , 1000.67188 , 90.0 )
setElementInterior ( ped2 , 12 )
local ped3 = createPed ( 11 , 1141.30042 , - 3.92268 , 1000.67188 , 90.0 )
setElementInterior ( ped3 , 12 )
local och = createPed ( 166 , 1135.75464 , - 11.21083 , 1000.67969 , 0.0 )
setElementInterior ( och , 12 )
local och1 = createPed ( 163 , 2088.39331 , 1453.21680 , 10.82031 , 180.0 )
local och2 = createPed ( 163 , 2091.47778 , 1450.13745 , 10.82031 , 90.0 )
----------------- KOMUNIKAT KASYNA WEJ / WYJ -----------------------
function wejscienapis ( el )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #00FF1EWitaj w Las Venturas Casino, grasz i pijesz na w?asn? odpowiedzialno??!" , el , 255 , 0 , 0 , true )
end
addEventHandler ( "onMarkerHit" , markerwej , wejscienapis )
function wyjscienapis ( el )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #FF0033Mamy nadziej?, ?e wr?cisz do nas jak tylko uda ci si? zdoby? got?wk?!" , el , 255 , 0 , 0 , true )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjscienapis )
----------------- GRA MASZYNA 1 ---------------
addEventHandler ( "onMarkerHit" , maszyna1 , function ( getRootElementelement )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #33CCFFWitaj w maszynie losuj?cej, tutaj b?dziesz m?g? gra? w?asnymi pieni?dzmi!" , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #FF0033Przegrana got?wka, #33CCFFpozsotaje w maszynie." , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #66FF33Wygrana got?wka, #33CCFFzostaje pomno?ona #66FF33*25% #33CCFFprzez to co postawi?e?." , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #33CCFFAby postawi? pieni?dze u?yj #FF0033/postaw <kwota>, #33CCFFPowodzenia!" , getRootElement (), 255 , 0 , 0 , true )
end )
local function result ( tpr , type )
if type == true then
wynik = cash + ( cash / 4 )
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] #33FF33Brawo! Maszyna wylosowa?a Twoje liczby - wygrywasz " .. string . format ( "$ %0.2f" , wynik ).. "" , tpr , 255 , 0 , 0 , true )
givePlayerMoney ( tpr , wynik )
active = false
elseif type == false then
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Niestety dopad? ci? dzisiaj, pech. Maszyna wylosowa?a inne liczby. Spr?buj jeszcze raz!" , tpr , 255 , 255 , 255 , true )
active = false
end
end
addCommandHandler ( "postaw" , function ( tpr , cmd , kwota )
if kwota then
if active == true then
return outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Maszyna jest w trakcie losowania, prosimy o cierpliwo??!" , tpr , 255 , 0 , 0 , true )
end
kwota = tonumber ( kwota )
cash = 0
rnd = nil
if type ( kwota ) == "number" then
if isElementWithinMarker ( tpr , maszyna1 ) then
if kwota >= 0 then
if kwota > getPlayerMoney ( tpr ) then
local price = string . format ( "$ %0.2f" , kwota )
return outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Nie posiadasz tyle got?wki! " .. price , tpr , 255 , 255 , 255 , true )
end
rnd = math . random ( 1 , 8 )
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] #33CCFFLosowanie wystartowa?o! ?yczymy Szcz?scia!" , tpr , 255 , 255 , 255 , true )
active = true
takePlayerMoney ( tpr , kwota )
cash = kwota
if rnd == 1 or rnd == 3 or rnd == 4 or rnd == 5 or rnd == 6 or rnd == 7 or rnd == 8 then
setTimer ( result , 4000 , 1 , tpr , true )
elseif rnd == 2 then
setTimer ( result , 4000 , 1 , tpr , false )
end
end
end
end
end
end )
----------------- GRA MASZYNA 2 ---------------
addEventHandler ( "onMarkerHit" , maszyna2 , function ( getRootElementelement )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #33CCFFWitaj w maszynie losuj?cej, tutaj b?dziesz m?g? gra? w?asnymi pieni?dzmi!" , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #FF0033Przegrana got?wka, #33CCFFpozsotaje w maszynie." , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #66FF33Wygrana got?wka, #33CCFFzostaje pomno?ona #66FF33*25% #33CCFFprzez to co postawi?e?." , getRootElement (), 255 , 0 , 0 , true )
outputChatBox ( "[#FFFFFFMASZYNA#FF0033] #33CCFFAby postawi? pieni?dze u?yj #FF0033/postaw <kwota>, #33CCFFPowodzenia!" , getRootElement (), 255 , 0 , 0 , true )
end )
local function result ( tpr , type )
if type == true then
wynik = cash + ( cash / 4 )
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] #33FF33Brawo! Maszyna wylosowa?a Twoje liczby - wygrywasz " .. string . format ( "$ %0.2f" , wynik ).. "" , tpr , 255 , 0 , 0 , true )
givePlayerMoney ( tpr , wynik )
active = false
elseif type == false then
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Niestety dopad? ci? dzisiaj, pech. Maszyna wylosowa?a inne liczby. Spr?buj jeszcze raz!" , tpr , 255 , 255 , 255 , true )
active = false
end
end
addCommandHandler ( "postaw" , function ( tpr , cmd , kwota )
if kwota then
if active == true then
return outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Maszyna jest w trakcie losowania, prosimy o cierpliwo??!" , tpr , 255 , 0 , 0 , true )
end
kwota = tonumber ( kwota )
cash = 0
rnd = nil
if type ( kwota ) == "number" then
if isElementWithinMarker ( tpr , maszyn2 ) then
if kwota >= 0 then
if kwota > getPlayerMoney ( tpr ) then
local price = string . format ( "$ %0.2f" , kwota )
return outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] Nie posiadasz tyle got?wki! " .. price , tpr , 255 , 255 , 255 , true )
end
rnd = math . random ( 1 , 8 )
outputChatBox ( "#FF0033[#FFFFFFINFO-MASZYNA#FF0033] #33CCFFLosowanie wystartowa?o! ?yczymy Szcz?scia!" , tpr , 255 , 255 , 255 , true )
active = true
takePlayerMoney ( tpr , kwota )
cash = kwota
if rnd == 1 or rnd == 3 or rnd == 4 or rnd == 5 or rnd == 6 or rnd == 7 or rnd == 8 then
setTimer ( result , 4000 , 1 , tpr , true )
elseif rnd == 2 then
setTimer ( result , 4000 , 1 , tpr , false )
end
end
end
end
end
end )
[ Dodano : 2017-07-28, 16:06 ]
Pozatym masz w holere b??d?w w tym skrypcie ;/
Wysłany: 2017-07-28, 16:27
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Damian2511 , Wszytko poprawione teraz nie wiem jak zablokowac bo wozem mozna wjechac w mrker
Wysłany: 2017-07-28, 16:30
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
dodaj na poczatku
If isPedInVehicle ( plr ) then
return
end
Wysłany: 2017-07-28, 16:37
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Damian2511 , W kt?rym miejscu ?
[ Dodano : 2017-07-28, 16:38 ]
Przypominam ze to plik serwerowy
Wysłany: 2017-07-28, 16:39
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
Ale do czego wozem mo?na wjecha? do kt?rego markera przypomnij?
Wysłany: 2017-07-28, 16:40
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
-------- WEJSCIE / WYJSCIE DO KASYNA ------------
local markerwej = createMarker ( 2089.7099609375 , 1451.3182373047 , 11.4203125 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
local markerwyj = createMarker ( 1133 ,- 15.2 , 1001.2796875 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
setElementInterior ( markerwyj , 12 )
local idinteriorwej = 12
local x , y , z = 1132.9450 ,- 8.6750 , 1000.6800
function interior ( source )
setElementInterior ( source , idinteriorwej )
setElementPosition ( source , x , y , z )
end
addEventHandler ( "onMarkerHit" , markerwej , interior , false )
local idinteriorwyj = 0
local x , y , z2 = 2135.66064 , 1453.90540 , 10.82031
function wyjsciezinterioru ( source )
setElementInterior ( source , idinteriorwyj )
setElementPosition ( source , x , y , z2 )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjsciezinterioru , false )
[ Dodano : 2017-07-28, 16:41 ]
Ten plik mam jako serwerowy, chce zablokowa? aby gracze nie teleportowali sie z wozem do ineroioru
Wysłany: 2017-07-28, 16:45
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
-------- WEJSCIE / WYJSCIE DO KASYNA ------------
local markerwej = createMarker ( 2089.7099609375 , 1451.3182373047 , 11.4203125 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
local markerwyj = createMarker ( 1133 ,- 15.2 , 1001.2796875 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
setElementInterior ( markerwyj , 12 )
local idinteriorwej = 12
local x , y , z = 1132.9450 ,- 8.6750 , 1000.6800
function interior ( source )
if isPedInVehicle ( source ) then
return end
setElementInterior ( source , idinteriorwej )
setElementPosition ( source , x , y , z )
end
addEventHandler ( "onMarkerHit" , markerwej , interior , false )
local idinteriorwyj = 0
local x , y , z2 = 2135.66064 , 1453.90540 , 10.82031
function wyjsciezinterioru ( source )
setElementInterior ( source , idinteriorwyj )
setElementPosition ( source , x , y , z2 )
end
addEventHandler ( "onMarkerHit" , markerwyj , wyjsciezinterioru , false )
Wysłany: 2017-07-28, 16:47
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Teraz teleportuje woz na odludzie
Wysłany: 2017-07-28, 16:58
Hades.
Łiiiiiiiiii
Wiek: 22 Na forum: 4699 dni Posty: 372
Nick w MP: Hades
Piwa : 3214
zamien to if isPedInVehicle(source) then na if not isPedInVehicle ( source ) then
Wysłany: 2017-07-28, 17:14
daniel2k17
Wiek: 34 Na forum: 3233 dni Posty: 7
Nick w MP: danielekk
Wysłany: 2017-07-28, 19:20
NeX.
Calm Story
Wiek: 26 Na forum: 3643 dni Posty: 56
Nick w MP: NeX
Piwa : 36
Daniel, ?ap.
local markerwej = createMarker ( 2089.7 , 1451.4 , 11.42 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
local markerwyj = createMarker ( 1133 ,- 15.2 , 1001.28 , "arrow" , 1.2 , 243 , 218 , 011 , 170 )
setElementInterior ( markerwyj , 12 )
addEventHandler ( "onMarkerHit" , markerwej ,function( plr , dm )
if plr and isElement ( plr ) and getElementType ( plr ) == "player" then
if not dm then return end
if not isPedInVehicle ( plr ) then
setElementInterior ( plr , 12 )
setElementPosition ( plr , 1132.95 ,- 8.8 , 1000.68 )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #00FF1EWitaj w Las Venturas Casino,grasz i pijesz na w?asn? odpowiedzialno??!" , plr , 255 , 0 , 0 , true )
end
end
end )
addEventHandler ( "onMarkerHit" , markerwyj ,function( plr , dm )
if plr and isElement ( plr ) and getElementType ( plr ) == "player" then
if not dm then return end
if not isPedInVehicle ( plr ) then
setElementInterior ( plr , 0 )
setElementPosition ( plr , 2135.66 , 1453.91 , 10.82 )
outputChatBox ( "[#FFFFFFKASYNO#FF0033] #FF0033Mamy nadziej?,?e wr?cisz do nas jak tylko uda ci si? zdoby? got?wk?!" , plr , 255 , 0 , 0 , true )
end
end
end )
Tyle "znawc?w" LUA, a nikomu nie chce si? pom?c?
Podpis
Wykonuję zasoby programistyczne w języku lua. Osoby zainteresowane proszone są o kontakt.
[email protected]
Tagi: teleport :: bez :: wozu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: