Wysłany: 2015-09-15, 18:44
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
Witam, mam problem z prac? by Shuffle (taxi)
Chodzi o to ze nie respi mi tych tax?wek .
Kod:
local allow_vehs ={
[ 420 ]= true ,
}
local vehs ={
{ 1779.7333984375 , - 1931.029296875 , 13.521888732911 },
{ 1784.7333984375 , - 1931.029296875 , 13.521001266479 },
{ 1791.7333984375 , - 1931.029296875 , 13.521606445312 },
{ 1797.7333984375 , - 1931.029296875 , 13.521175384521 },
{ 1803.7333984375 , - 1931.029296875 , 13.521175384521 },
}
taxi ={}
for k , v in ipairs ( vehs )do
taxi [ k ]= createVehicle ( 420 , v [ 1 ], v [ 2 ], v [ 3 ])
setElementRotation ( taxi [ k ], 0 , 0 , 89.538452148438 )
setElementData ( taxi [ k ], "vehicle:taxi" , true )
end
addEventHandler ( "onPlayerVehicleEnter" , root ,function( veh , seat )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Taxi" )) then
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
outputChatBox ( "*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi." , source , 255 , 255 , 255 )
setElementData ( source , "player:taxi" , true )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
end )
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end )
addEventHandler ( "onPlayerVehicleExit" , root ,function( veh , seat )
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
respawnVehicle ( veh )
setElementData ( source , "player:taxi" , false )
end
end
end
end )
addCommandHandler ( "taxi" ,function( plr )
if getElementData ( plr , "taxi" ) then
return outputChatBox ( "*Zam?wi?e?(a?) ju? us?ug?. Poczekaj cierpliwie na taks?wk?" , plr , 255 , 255 , 255 )
end
count ={}
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
table . insert ( count , v )
end
end
end
end
if #count==0 then
return outputChatBox ( "*Brak taks?wkarzy na s?u?bie." , plr , 255 , 255 , 255 )
end
local x , y , z = getElementPosition ( plr )
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
outputChatBox ( "--NOWE ZLECENIE--" , v , 255 , 255 , 0 )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " zam?wi?(a) us?ug? taxi." , v , 255 , 255 , 0 )
local miasto = getZoneName ( x , y , z )
local strefa = getZoneName ( x , y , z , true )
outputChatBox ( "*Po?o?enie : " .. miasto .. ", " .. strefa , v , 255 , 255 , 0 )
end
end
end
end
outputChatBox ( "*Zam?wi?e?(a?) us?ug? taxi. Czekaj cierpliwie w tym miejscu, taks?wkarz nie b?dzie cie szuka?." , plr , 255 , 255 , 0 )
setElementData ( plr , "taxi" , true )
end )
addCommandHandler ( "oplata" ,function( plr , cmd , gracz , ilosc )
if getElementData ( plr , "player:taxi" ) then
local cel = getPlayerFromName ( gracz )
if cel then
setElementData ( cel , "TaxiInfo" ,{ plr , ilosc })
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " poda?(a) Ci kwitek do zap?aty " .. ilosc .. " $. Aby podpisa? wpisz /akceptuj" , cel , 255 , 255 , 255 )
outputChatBox ( "*Poda?e?(a?) kwitek klientowi do zap?aty." , plr , 255 , 255 , 255 )
end
end
end )
addCommandHandler ( "akceptuj" ,function( plr )
if getElementData ( plr , "TaxiInfo" ) then
local taksowkarz , ilosc = unpack ( getElementData ( plr , "TaxiInfo" ))
local taksowkarz = getPlayerFromName ( getPlayerName ( taksowkarz ))
if not taksowkarz then
return outputChatBox ( "*Taks?wkarz nie jest ju? online" , plr )
end
if tonumber ( getPlayerMoney ( plr ))< tonumber ( ilosc ) then
return outputChatBox ( "*Nie posiadasz pieni?dzy aby podpisa? kwitek z kwot? " .. ilosc .. " $" , plr , 255 , 255 , 255 )
end
givePlayerMoney ( taksowkarz , tonumber ( ilosc ))
takePlayerMoney ( plr , tonumber ( ilosc ))
outputChatBox ( "*Podpisa?e? kwitek. Zabrano Ci " .. ilosc .. " $" , plr )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " podpisa? kwitek. Otrzymujesz " .. ilosc .. " $" , taksowkarz , 255 , 255 , 255 )
end
end )
Script Error : Taxi\taxi_s.lua:43: '<eof>' expected near 'end'
Prosze o pomoc
Jedyne co tam zmienia?em to kordy tax?wek.
Za pomoc stawiam piwko i repke.
Pozdrawiam,
Mlodasny
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Ostatnio zmieniony przez mlodasnygo 2015-09-15, 19:05, w całości zmieniany 1 raz
Wysłany: 2015-09-15, 18:53
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
w 46 linijce skasuj ")" i powinno lata?.
Wysłany: 2015-09-15, 18:59
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
W 46 linijce nie ma ")"
OD 45linijki do 54 linijki. :>
addEventHandler ( "onPlayerVehicleExit" , root ,function( veh , seat )
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
respawnVehicle ( veh )
setElementData ( source , "player:taxi" , false )
end
end
end
end )
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-15, 19:02
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Skopiowa?em kod od ciebie i wysz?a 46, w ka?dym b?d? razie:
local allow_vehs ={
[ 420 ]= true ,
}
local vehs ={
{ 1779.7333984375 , - 1931.029296875 , 13.521888732911 },
{ 1784.7333984375 , - 1931.029296875 , 13.521001266479 },
{ 1791.7333984375 , - 1931.029296875 , 13.521606445312 },
{ 1797.7333984375 , - 1931.029296875 , 13.521175384521 },
{ 1803.7333984375 , - 1931.029296875 , 13.521175384521 },
}
taxi ={}
for k , v in ipairs ( vehs )do
taxi [ k ]= createVehicle ( 420 , v [ 1 ], v [ 2 ], v [ 3 ])
setElementRotation ( taxi [ k ], 0 , 0 , 89.538452148438 )
setElementData ( taxi [ k ], "vehicle:taxi" , true )
end
addEventHandler ( "onPlayerVehicleEnter" , root ,function( veh , seat )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Taxi" )) then
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
outputChatBox ( "*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi." , source , 255 , 255 , 255 )
setElementData ( source , "player:taxi" , true )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end )
addEventHandler ( "onPlayerVehicleExit" , root ,function( veh , seat )
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
respawnVehicle ( veh )
setElementData ( source , "player:taxi" , false )
end
end
end
end )
addCommandHandler ( "taxi" ,function( plr )
if getElementData ( plr , "taxi" ) then
return outputChatBox ( "*Zam?wi?e?(a?) ju? us?ug?. Poczekaj cierpliwie na taks?wk?" , plr , 255 , 255 , 255 )
end
count ={}
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
table . insert ( count , v )
end
end
end
end
if #count==0 then
return outputChatBox ( "*Brak taks?wkarzy na s?u?bie." , plr , 255 , 255 , 255 )
end
local x , y , z = getElementPosition ( plr )
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
outputChatBox ( "--NOWE ZLECENIE--" , v , 255 , 255 , 0 )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " zam?wi?(a) us?ug? taxi." , v , 255 , 255 , 0 )
local miasto = getZoneName ( x , y , z )
local strefa = getZoneName ( x , y , z , true )
outputChatBox ( "*Po?o?enie : " .. miasto .. ", " .. strefa , v , 255 , 255 , 0 )
end
end
end
end
outputChatBox ( "*Zam?wi?e?(a?) us?ug? taxi. Czekaj cierpliwie w tym miejscu, taks?wkarz nie b?dzie cie szuka?." , plr , 255 , 255 , 0 )
setElementData ( plr , "taxi" , true )
end )
addCommandHandler ( "oplata" ,function( plr , cmd , gracz , ilosc )
if getElementData ( plr , "player:taxi" ) then
local cel = getPlayerFromName ( gracz )
if cel then
setElementData ( cel , "TaxiInfo" ,{ plr , ilosc })
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " poda?(a) Ci kwitek do zap?aty " .. ilosc .. " $. Aby podpisa? wpisz /akceptuj" , cel , 255 , 255 , 255 )
outputChatBox ( "*Poda?e?(a?) kwitek klientowi do zap?aty." , plr , 255 , 255 , 255 )
end
end
end )
addCommandHandler ( "akceptuj" ,function( plr )
if getElementData ( plr , "TaxiInfo" ) then
local taksowkarz , ilosc = unpack ( getElementData ( plr , "TaxiInfo" ))
local taksowkarz = getPlayerFromName ( getPlayerName ( taksowkarz ))
if not taksowkarz then
return outputChatBox ( "*Taks?wkarz nie jest ju? online" , plr )
end
if tonumber ( getPlayerMoney ( plr ))< tonumber ( ilosc ) then
return outputChatBox ( "*Nie posiadasz pieni?dzy aby podpisa? kwitek z kwot? " .. ilosc .. " $" , plr , 255 , 255 , 255 )
end
givePlayerMoney ( taksowkarz , tonumber ( ilosc ))
takePlayerMoney ( plr , tonumber ( ilosc ))
outputChatBox ( "*Podpisa?e? kwitek. Zabrano Ci " .. ilosc .. " $" , plr )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " podpisa? kwitek. Otrzymujesz " .. ilosc .. " $" , taksowkarz , 255 , 255 , 255 )
end
end )
Ostatnio zmieniony przez #404 2015-09-15, 19:19, w całości zmieniany 1 raz
Wysłany: 2015-09-15, 19:10
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
Dalej nie dzia?a, kolejny error...
Kod: Error: Loading script failed: Taxi\taxi_s.lua:47: ')' expected (to close '(' at line 30) near 'if'
Oczywi?cie tamten znikn??.
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Wysłany: 2015-09-15, 19:16
#404
Wiek: 26 Na forum: 4771 dni Posty: 1438
Piwa : 2512
Spr?buj tak to zrobi?:
function aaaa ( veh , seat )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Taxi" )) then
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
outputChatBox ( "*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi." , source , 255 , 255 , 255 )
setElementData ( source , "player:taxi" , true )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
addEventHandler ( "onPlayerVehicleEnter" , root , aaaa )
Wysłany: 2015-09-15, 19:16
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
mlodasnygo ,
local allow_vehs ={
[ 420 ]= true ,
}
local vehs ={
{ 1779.7333984375 , - 1931.029296875 , 13.521888732911 },
{ 1784.7333984375 , - 1931.029296875 , 13.521001266479 },
{ 1791.7333984375 , - 1931.029296875 , 13.521606445312 },
{ 1797.7333984375 , - 1931.029296875 , 13.521175384521 },
{ 1803.7333984375 , - 1931.029296875 , 13.521175384521 },
}
taxi ={}
for k , v in ipairs ( vehs )do
taxi [ k ]= createVehicle ( 420 , v [ 1 ], v [ 2 ], v [ 3 ])
setElementRotation ( taxi [ k ], 0 , 0 , 89.538452148438 )
setElementData ( taxi [ k ], "vehicle:taxi" , true )
end
addEventHandler ( "onPlayerVehicleEnter" , root ,function( veh , seat )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Taxi" )) then
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
outputChatBox ( "*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi." , source , 255 , 255 , 255 )
setElementData ( source , "player:taxi" , true )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end )
addEventHandler ( "onPlayerVehicleExit" , root ,function( veh , seat )
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
respawnVehicle ( veh )
setElementData ( source , "player:taxi" , false )
end
end
end
end )
addCommandHandler ( "taxi" ,function( plr )
if getElementData ( plr , "taxi" ) then
return outputChatBox ( "*Zam?wi?e?(a?) ju? us?ug?. Poczekaj cierpliwie na taks?wk?" , plr , 255 , 255 , 255 )
end
count ={}
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
table . insert ( count , v )
end
end
end
end
if #count==0 then
return outputChatBox ( "*Brak taks?wkarzy na s?u?bie." , plr , 255 , 255 , 255 )
end
local x , y , z = getElementPosition ( plr )
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
outputChatBox ( "--NOWE ZLECENIE--" , v , 255 , 255 , 0 )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " zam?wi?(a) us?ug? taxi." , v , 255 , 255 , 0 )
local miasto = getZoneName ( x , y , z )
local strefa = getZoneName ( x , y , z , true )
outputChatBox ( "*Po?o?enie : " .. miasto .. ", " .. strefa , v , 255 , 255 , 0 )
end
end
end
end
outputChatBox ( "*Zam?wi?e?(a?) us?ug? taxi. Czekaj cierpliwie w tym miejscu, taks?wkarz nie b?dzie cie szuka?." , plr , 255 , 255 , 0 )
setElementData ( plr , "taxi" , true )
end )
addCommandHandler ( "oplata" ,function( plr , cmd , gracz , ilosc )
if getElementData ( plr , "player:taxi" ) then
local cel = getPlayerFromName ( gracz )
if cel then
setElementData ( cel , "TaxiInfo" ,{ plr , ilosc })
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " poda?(a) Ci kwitek do zap?aty " .. ilosc .. " $. Aby podpisa? wpisz /akceptuj" , cel , 255 , 255 , 255 )
outputChatBox ( "*Poda?e?(a?) kwitek klientowi do zap?aty." , plr , 255 , 255 , 255 )
end
end
end )
addCommandHandler ( "akceptuj" ,function( plr )
if getElementData ( plr , "TaxiInfo" ) then
local taksowkarz , ilosc = unpack ( getElementData ( plr , "TaxiInfo" ))
local taksowkarz = getPlayerFromName ( getPlayerName ( taksowkarz ))
if not taksowkarz then
return outputChatBox ( "*Taks?wkarz nie jest ju? online" , plr )
end
if tonumber ( getPlayerMoney ( plr ))< tonumber ( ilosc ) then
return outputChatBox ( "*Nie posiadasz pieni?dzy aby podpisa? kwitek z kwot? " .. ilosc .. " $" , plr , 255 , 255 , 255 )
end
givePlayerMoney ( taksowkarz , tonumber ( ilosc ))
takePlayerMoney ( plr , tonumber ( ilosc ))
outputChatBox ( "*Podpisa?e? kwitek. Zabrano Ci " .. ilosc .. " $" , plr )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " podpisa? kwitek. Otrzymujesz " .. ilosc .. " $" , taksowkarz , 255 , 255 , 255 )
end
end )
Wysłany: 2015-09-15, 19:17
Jurandovsky
Kurdebele
Wiek: 17 Na forum: 4838 dni Posty: 915
Piwa : 2697
local allow_vehs ={
[ 420 ]= true ,
}
local vehs ={
{ 1779.7333984375 , - 1931.029296875 , 13.521888732911 },
{ 1784.7333984375 , - 1931.029296875 , 13.521001266479 },
{ 1791.7333984375 , - 1931.029296875 , 13.521606445312 },
{ 1797.7333984375 , - 1931.029296875 , 13.521175384521 },
{ 1803.7333984375 , - 1931.029296875 , 13.521175384521 },
}
taxi ={}
for k , v in ipairs ( vehs )do
taxi [ k ]= createVehicle ( 420 , v [ 1 ], v [ 2 ], v [ 3 ])
setElementRotation ( taxi [ k ], 0 , 0 , 89.538452148438 )
setElementData ( taxi [ k ], "vehicle:taxi" , true )
end
addEventHandler ( "onPlayerVehicleEnter" , root ,function( veh , seat )
if isObjectInACLGroup ( "user." .. getAccountName ( getPlayerAccount ( source )), aclGetGroup ( "Taxi" )) then
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
outputChatBox ( "*Zacz??es prac?. Dostaniesz informacj? o po?o?eniu klienta po wezwaniu us?ugi." , source , 255 , 255 , 255 )
setElementData ( source , "player:taxi" , true )
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
end
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
setElementData ( source , "taxi" , false )
end
end
end
end )
addEventHandler ( "onPlayerVehicleExit" , root ,function( veh , seat )
if seat == 0 then
if allow_vehs [ getElementModel ( veh )] then
if getElementData ( veh , "vehicle:taxi" ) then
respawnVehicle ( veh )
setElementData ( source , "player:taxi" , false )
end
end
end
end )
addCommandHandler ( "taxi" ,function( plr )
if getElementData ( plr , "taxi" ) then
return outputChatBox ( "*Zam?wi?e?(a?) ju? us?ug?. Poczekaj cierpliwie na taks?wk?" , plr , 255 , 255 , 255 )
end
count ={}
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
table . insert ( count , v )
end
end
end
end
if #count==0 then
return outputChatBox ( "*Brak taks?wkarzy na s?u?bie." , plr , 255 , 255 , 255 )
end
local x , y , z = getElementPosition ( plr )
for _ , v in ipairs ( getElementsByType ( "player" ))do
if getPedOccupiedVehicle ( v ) then
if getElementData ( getPedOccupiedVehicle ( v ), "vehicle:taxi" ) then
if allow_vehs [ getElementModel ( getPedOccupiedVehicle ( v ))] then
outputChatBox ( "--NOWE ZLECENIE--" , v , 255 , 255 , 0 )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " zam?wi?(a) us?ug? taxi." , v , 255 , 255 , 0 )
local miasto = getZoneName ( x , y , z )
local strefa = getZoneName ( x , y , z , true )
outputChatBox ( "*Po?o?enie : " .. miasto .. ", " .. strefa , v , 255 , 255 , 0 )
end
end
end
end
outputChatBox ( "*Zam?wi?e?(a?) us?ug? taxi. Czekaj cierpliwie w tym miejscu, taks?wkarz nie b?dzie cie szuka?." , plr , 255 , 255 , 0 )
setElementData ( plr , "taxi" , true )
end )
addCommandHandler ( "oplata" ,function( plr , cmd , gracz , ilosc )
if getElementData ( plr , "player:taxi" ) then
local cel = getPlayerFromName ( gracz )
if cel then
setElementData ( cel , "TaxiInfo" ,{ plr , ilosc })
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " poda?(a) Ci kwitek do zap?aty " .. ilosc .. " $. Aby podpisa? wpisz /akceptuj" , cel , 255 , 255 , 255 )
outputChatBox ( "*Poda?e?(a?) kwitek klientowi do zap?aty." , plr , 255 , 255 , 255 )
end
end
end )
addCommandHandler ( "akceptuj" ,function( plr )
if getElementData ( plr , "TaxiInfo" ) then
local taksowkarz , ilosc = unpack ( getElementData ( plr , "TaxiInfo" ))
local taksowkarz = getPlayerFromName ( getPlayerName ( taksowkarz ))
if not taksowkarz then
return outputChatBox ( "*Taks?wkarz nie jest ju? online" , plr )
end
if tonumber ( getPlayerMoney ( plr ))< tonumber ( ilosc ) then
return outputChatBox ( "*Nie posiadasz pieni?dzy aby podpisa? kwitek z kwot? " .. ilosc .. " $" , plr , 255 , 255 , 255 )
end
givePlayerMoney ( taksowkarz , tonumber ( ilosc ))
takePlayerMoney ( plr , tonumber ( ilosc ))
outputChatBox ( "*Podpisa?e? kwitek. Zabrano Ci " .. ilosc .. " $" , plr )
outputChatBox ( "*Gracz " .. getPlayerName ( plr ).. " podpisa? kwitek. Otrzymujesz " .. ilosc .. " $" , taksowkarz , 255 , 255 , 255 )
end
end )
Sprobuj
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
Wysłany: 2015-09-15, 20:25
mlodasnygo
Wiek: 16 Na forum: 3972 dni Posty: 205
Piwa : 518
Dzi?ki wielkie wam all! Uzy?em wersji luki123luki123 ,
Pozdro
Podpis
600 dni -
10 marca 2017
500 piw -
10 marca 2017
Tagi: problem :: pracą :: taxi :: shuffle :: nie :: pokazuje :: taxówek.
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: