Wysłany: 2020-09-15, 20:09
vostezpl
Wiek: 22 Na forum: 2092 dni Posty: 9
Nick w MP: lewak
Witam, jak mam podpi?? ten skrypt pod swoj? element dat?? Co mam tutaj ?le?
--[[
Author : AteX < atexprogramming @ gmail . com >
]]--
function ttv ( plr , cmd , id )
local account = getPlayerAccount ( plr )
local name = getAccountName ( account )
if not isObjectInACLGroup ( "user.lewak" .. name , aclGetGroup ( "Console" )) then return end
if id then
local id = tonumber ( id )
local v = znajdzpojazd ( id )
if v then
warpPedIntoVehicle ( plr , v )
outputChatBox ( "Teleportowano do pojazdu o ID: " .. id , plr , 255 , 0 , 0 , true )
else
outputChatBox ( "Nie znaleziono pojazdu o takim ID." , plr , 255 , 0 , 0 , true )
end
else
outputChatBox ( "Nie wpisa?e? ID pojazdu." , plr , 255 , 0 , 0 , true )
end
end
addCommandHandler ( "ttv" , ttv )
function ttp ( plr , cmd , id )
local account = getPlayerAccount ( plr )
local name = getAccountName ( account )
if not isObjectInACLGroup ( "user.lewak" .. name , aclGetGroup ( "Console" )) then return end
if id then
local id = tonumber ( id )
local v = znajdzpojazd ( id )
if v then
local x , y , z = getElementPosition ( plr )
setElementPosition ( v , x , y , z )
setElementPosition ( plr , x , y , z + 3 )
outputChatBox ( "Teleportowano pojazd o ID: " .. id , plr , 255 , 0 , 0 , true )
else
outputChatBox ( "Nie znaleziono pojazdu o takim ID." , plr , 255 , 0 , 0 , true )
end
else
outputChatBox ( "Nie wpisa?e? ID pojazdu." , plr , 255 , 0 , 0 , true )
end
end
addCommandHandler ( "ttp" , ttp )
function vehowner ( plr , cmd , id )
local account = getPlayerAccount ( plr )
local name = getAccountName ( account )
if not isObjectInACLGroup ( "user.lewak" .. name , aclGetGroup ( "Console" )) then return end
if id then
local id = tonumber ( id )
local v = znajdzpojazd ( id )
if v then
local wlasciciel = getElementData ( v , "lewak" )
outputChatBox ( "Pojazd o ID: " .. id .. ", nale?y do gracza: " .. wlasciciel , plr , 255 , 0 , 0 , true )
else
outputChatBox ( "Nie znaleziono pojazdu o takim ID." , plr , 255 , 0 , 0 , true )
end
else
outputChatBox ( "Nie wpisa?e? ID pojazdu." , plr , 255 , 0 , 0 , true )
end
end
addCommandHandler ( "vehowner" , vehowner )
function znajdzpojazd ( id )
for i , v in pairs ( getElementsByType ( "vehicle" )) do
if getElementData ( v , "1" ) == id then
return v
end
end
end
--[[
Author : AteX < atexprogramming @ gmail . com >
]]--
Ostatnio zmieniony przez Wilq 2020-09-15, 22:34, w całości zmieniany 2 razy
Wysłany: 2020-09-15, 22:32
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Pobieraj element dat? za pomoc? poni?szej funkcji.
?eby w skrypcie u?ywa? element daty musisz usun?? wszelkie inne warunki sprawdzaj?ce i zastosowa? powy?sz? funkcj?.
Skrypt nie dzia?a, czy w czym jest problem?
Wysłany: 2020-09-15, 23:27
vostezpl
Wiek: 22 Na forum: 2092 dni Posty: 9
Nick w MP: lewak
Komendy ze skryptu nie dzia?aj?, trzeba podpi?? elementdate pod id pojazd?w, nie wiem jak
Wysłany: 2020-09-16, 07:27
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
No to ju? napisa?em: usuwasz te warunki sprawdzaj?ce, w kt?rych wykorzystujesz ACL i zast?pujesz je warunkami z element dat?. Co? na zasadzie tego:
if getElementData ( zmienna_gracza , "klucz_element_daty" ) == "wartosc_element_daty" then
Wysłany: 2020-09-16, 11:36
vostezpl
Wiek: 22 Na forum: 2092 dni Posty: 9
Nick w MP: lewak
A sk?d zdoby? klucz i warto?? Element daty?
Wysłany: 2020-09-16, 20:03
Wilq
Wiek: 24 Na forum: 4429 dni Posty: 3410
Piwa : 739
Gracz musi posiada? tak? element dat?. Je?li nie wiesz o co chodzi, to mo?liwe ?e musisz j? graczowi ustawi?. Poni?sze funkcja to zalatwi:
Tagi: podpisanie :: pod :: elementdate
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: