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

Wysłany: 2016-12-24, 20:27


SpeedCN







Wiek: 27
Na forum: 3469 dni
Posty: 1
Nick w MP: SpeedCN



Respekt: 50

Witam,moglbym prosi? o przerobienie skryptu na przyklejanie pojazdow do innych pojazdow,tak ?eby si? dalo tylko przyklei? helki do samochodow i na odwrot? :P
Skrypt:
Kod:


function gluev()
-- viendo si funciona
local outString
outputDebugString("glue vehicle")

local thePlayer = getLocalPlayer()
local myVehicle = getPedOccupiedVehicle(thePlayer)
if myVehicle then
local attachMe, attachedTo

outputDebugString("my vehicle")
local vehicles = getElementsByType("vehicle")
local closest, cdist = nil, 100
local mx,my,mz = getElementPosition(myVehicle)
for k,v in ipairs(vehicles) do
if isElementStreamedIn(v) and v ~= myVehicle then
local x,y,z = getElementPosition(v)
local tmpdist = getDistanceBetweenPoints3D(x,y,z,mx,my,mz)
if tmpdist < cdist then
cdist = tmpdist
closest = v
end
end
end -- final de los autos

outputDebugString("Auto = " .. getVehicleName(closest) .. ", distancia: " .. tonumber(cdist) .. "")

-- distancia minima
if cdist > 2 or cdist == nil then
return false
end

-- comprobando si esta en helicoptero
local vtype = getElementModel(myVehicle)
if vtype == (487 or 548 or 425 or 417 or 488 or 497 or 563 or 447 or 469) then
attachMe = closest
attachedTo = myVehicle
else -- si no esta
attachMe = myVehicle
attachedTo = closest
end -- fin comprobacion

local px, py, pz = getElementPosition(attachedTo)
local vx, vy, vz = getElementPosition(attachMe)
local sx = px - vx
local sy = py - vy
local sz = pz - vz

local rotpX, rotpY, rotpZ = getElementRotation(attachedTo)
local rotvX, rotvY, rotvZ = getElementRotation(attachMe)

local t = math.rad(rotvX)
local p = math.rad(rotvY)
local f = math.rad(rotvZ)

local ct = math.cos(t)
local st = math.sin(t)
local cp = math.cos(p)
local sp = math.sin(p)
local cf = math.cos(f)
local sf = math.sin(f)

local z = ct*cp*sz + (sf*st*cp + cf*sp)*sx + (-cf*st*cp + sf*sp)*sy
local x = -ct*sp*sz + (-sf*st*sp + cf*cp)*sx + (cf*st*sp + sf*cp)*sy
local y = st*sz - sf*ct*sx + cf*ct*sy

local rotX = rotpX - rotvX
local rotY = rotpY - rotvY
local rotZ = rotpZ - rotvZ


triggerServerEvent("glueVehicle", attachMe, attachedTo, x*-1, y*-1, z*-1, rotX, rotY, rotZ)

unbindKey("b","down",gluev)
bindKey("b","down",ungluev)



else -- else no myvehicle
end -- end if myvehicle

end

addCommandHandler("gluev",gluev)


function ungluev ()
local player = getLocalPlayer()
local myVehicle = getPedOccupiedVehicle(player)
local vtype = getElementModel(myVehicle)
if vtype == (487 or 548 or 425 or 417 or 488 or 497 or 563 or 447 or 469) then
local attached = getAttachedElements(myVehicle)
for k,v in ipairs(attached) do
if getElementType(v) == "vehicle" then
myVehicle = v
end
end
end
triggerServerEvent("unglueVehicle", myVehicle)
unbindKey("jump","down",ungluev)
unbindKey("b","down",ungluev)
bindKey("b","down",gluev)
end

addCommandHandler("unglue",ungluev)

bindKey("b","down",gluev)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-25, 16:23


gg55







Wiek: 26
Na forum: 3602 dni
Posty: 55
Nick w MP: Kuba56

Piwa: 955

Respekt: 21

Witam, prosi?bym o przerobienie tego saveplayers

http://www94.zippyshare.com/v/o0bT5S4g/file.html


Zapisuje si? Organizacja a Premium Nie dzia?a i ani si? nie zapisuje Prosz? o Pomoc Za to: :piwo: respektu :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-26, 12:40


AssasiPlayGames







Wiek: 22
Na forum: 3757 dni
Posty: 176
Nick w MP: NiFeKpL

Piwa: 909

Respekt: 70,5

Prosze o przerobienie lss-domy z it's your world tak aby mo?na by?o otwiera? zamyka? dom
a tu macie link:http://www30.zippyshare.com/v/AORc5Inq/file.html

Ostatnio zmieniony przez AssasiPlayGames 2016-12-26, 15:59, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-26, 14:31


AteX







Wiek: 26
Na forum: 4015 dni
Posty: 927
Nick w MP: #AteX

Piwa: 8360

Respekt: 775,3
Respekt: 775,3Respekt: 775,3

"AssasiPlayGames" napisał/a:

Prosze o przerobienie lss-domy z it's your world tak aby mo?na by?o otwiera? zamyka? dom

To mo?e podaj link do skryptu?

Podpis
MultiTheftAuto++ dla MTA 1.5.7 już dostępne.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-12-26, 16:34


AssasiPlayGames







Wiek: 22
Na forum: 3757 dni
Posty: 176
Nick w MP: NiFeKpL

Piwa: 909

Respekt: 70,5

AteX, juz

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-01, 17:54


gg55







Wiek: 26
Na forum: 3602 dni
Posty: 55
Nick w MP: Kuba56

Piwa: 955

Respekt: 21

AssasiPlayGames, jak szukasz mapera albo admina to napisz na pw to si? zgodzimy

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-01, 23:24


Karol2000







Wiek: 26
Na forum: 3784 dni
Posty: 24



Respekt: 50

Witam, prosi?bym o przerobienie tego skryptu (chyba), ?eby przy banowaniu pojawia?o si? co? takiego:



DL do pliku:
http://www19.zippyshare.com/v/cAG2wwwI/file.html


Om?wi? wszystko:

KacperLLU has left the game [Banned] [Oszustwa finansowe-pow?d (nick: KacperLLU-nick gracza) (by mimosik--login admina )] ([PTS]mimos-nick admina)


W razie czego prosze o kontakt na GG: 53814335

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-01, 23:53


Avenged

Młodszy Szkrypter






Wiek: 23
Na forum: 3510 dni
Posty: 654
Nick w MP: Avenged

Piwa: 1570

Respekt: 326,3
Respekt: 326,3Respekt: 326,3Respekt: 326,3

Karol2000, postaram si? wykona? dla ciebie to, ale dopiero jutro popo?udniu :)

Podpis
LUA, JS, PHP



Zapraszam do skorzystania z moich usług: Klik

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-11, 17:17


gg55







Wiek: 26
Na forum: 3602 dni
Posty: 55
Nick w MP: Kuba56

Piwa: 955

Respekt: 21

Witam Ma taki Problem z saveplayers dzia?a organizacja a Premium nie zrobi mi kto? to ?eby dzia?a?o Premium i organizacja Prosz? was za to daje piwko i rep...


Plik saveplayers

https://megawrzuta.pl/download/cd1757f6fdcec83c2b58101d6c7112ca.html

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-17, 18:31


Qwertick

Coming soon...






Wiek: 23
Na forum: 3577 dni
Posty: 472
Nick w MP: Qwertick

Piwa: 2726

Respekt: 215,8
Respekt: 215,8Respekt: 215,8

"gg55" napisał/a:

Witam Ma taki Problem z saveplayers dzia?a organizacja a Premium nie zrobi mi kto? to ?eby dzia?a?o Premium i organizacja Prosz? was za to daje piwko i rep...


Plik saveplayers

https://megawrzuta.pl/download/cd1757f6fdcec83c2b58101d6c7112ca.html

Prosz? da?em Ci innego na szybko znalaz?em ale niestety ka?dy ma premium:
--[[
    ResourceOURGame v2
    DevelopersSplit <split.programista@gmail.com>
    You have no right to use this code without my permission.
    (c2015 <split.programista@gmail.com>. All rights reserved.
]]

function loadPlayerData(plr)
    local result=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_users WHERE id=?"getElementData(plr,"player:uid"))
    if result and #result > 0 then
        local v=result[1]
        setPlayerMoney(plr,v.money)
        setElementModel(plr,v.skin)
        setElementData(plr,"status","Aktywny")
        setElementData(plr,"player:logged",true)
        setElementData(plr,"player:mandate",v.mandate)
        setElementData(plr,"player:license:pjA",v.pjA)
        setElementData(plr,"player:license:pjB",v.pjB)
        setElementData(plr,"player:license:pjC",v.pjC)
        setElementData(plr,"player:license:pjL",v.pjL)
        setElementData(plr,"player:reputation",v.reputation)
        setElementData(plr,"player:workinjob",v.worker)
        setElementData(plr,"player:registerdate",v.registered)
        setElementData(plr,"player:hours",v.hours)
        local queryA=string.format("SELECT * FROM ogrpg_users WHERE id=%d AND premiumdate>NOW() LIMIT 1"getElementData(plr,"player:uid"))
        local resultA=exports["ogrpg-db"]:pobierzWyniki(queryA)
        if (resultAthen
            setElementData(plr,"player:premium",true)
            setElementData(plr,"player:premiumdate",v.premiumdate)
            setPlayerName(plr,"#dbb234"..getPlayerName(plr))
        else
            setElementData(plr,"player:premium",true)
        end
        setElementData(plr,"player:organization",false)
        setElementData(plr,"player:skin",v.skin)
        local org=exports["ogrpg-db"]:dbGet("SELECT * FROM ogrpg_organizations WHERE uid=? LIMIT 1"getElementData(plr,"player:uid")) -- pobieramy tylko JEDEN rekord
        if org and #org > 0 then
            setElementData(plr,"player:organization",org[1].code)
            exports['ogrpg-db']:dbSet("UPDATE ogrpg_organizations SET actived=curdate() WHERE uid=?"getElementData(plr,"player:uid"))
        end
        return true
    end
    return false
end

addEvent("load:player",true)
addEventHandler("load:player"root, function(player)
if isElement(player) and player then
if getElementType(player) ~= "player" then return end
loadPlayerData(player)
outputDebugString("Zaladowano statystyki gracza :"..getPlayerName(player))
end
end)
function savePlayerData(plr)
    local uid=getElementData(plr,"player:uid")
    if not uid then return end
    local money=getPlayerMoney(plr)
    local mandate=getElementData(plr,"player:mandate")
    local licensea=getElementData(plr,"player:license:pjA")
    local licenseb=getElementData(plr,"player:license:pjB")
    local licensec=getElementData(plr,"player:license:pjC")
    local licensel=getElementData(plr,"player:license:pjL")
    local reputation=getElementData(plr,"player:reputation")
    local worker =getElementData(plr,"player:workinjob")
    local hourstonumber(getElementData(plr,"player:hours")) or 0
    local query=exports["ogrpg-db"]:dbSet("UPDATE ogrpg_users SET money=?, reputation=?, mandate=?, pjA=?, pjB=?, pjC=?, pjL=?, worker=?, hours=? WHERE id=?",
    moneyreputationmandatelicensealicenseblicenseclicensel,worker,hoursuid)
end
addEvent("save:player",true)
addEventHandler("save:player"root, function(player)
if isElement(player) and player then
if getElementType(player) ~= "player" then return end
savePlayerData(player)
outputDebugString("Zapisano statystyki gracza :"..getPlayerName(player))
end
end)
addEventHandler("onPlayerQuit"root, function() savePlayerData(sourceend)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-17, 18:36


Taronek







Wiek: 26
Na forum: 3457 dni
Posty: 14
Nick w MP: Taronek

Piwa: 614

Respekt: 50

gg55, http://www79.zippyshare.com/v/9yI2jJWK/file.html tu masz i bedzie dzialac :)

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-19, 14:48


Remix110

Pewna osóbka :3






Wiek: 40
Na forum: 3663 dni
Posty: 291
Nick w MP: GoodNight

Piwa: 15

Respekt: 51

Cze??, Mam problem z skryptem na uleczanie wiem ?atwo go niby zrobi?.
Ale niewiem dlaczego mi nie dzia?a wpisuje /zdrowie i nic si? nie dzieje ;-;

skrypt

function Zdrowie setElementHealth )
setElementHealth thePlayer100 )
end
addCommandHandler "zdrowie"Zdrowie )


meta

Kod:

<meta>
<script src="Zdrowie.lua" type="client"/>
</meta>


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-19, 14:52


freadyy

uff ya






Wiek: 26
Na forum: 3437 dni
Posty: 33

Piwa: 5

Respekt: 85,3

Ostrzeżeń: 60%
"Remix110" napisał/a:

Cze??, Mam problem z skryptem na uleczanie wiem ?atwo go niby zrobi?.
Ale niewiem dlaczego mi nie dzia?a wpisuje /zdrowie i nic si? nie dzieje ;-;

skrypt

function Zdrowie setElementHealth )
setElementHealth thePlayer100 )
end
addCommandHandler "zdrowie"Zdrowie )


meta

Kod:

<meta>
<script src="Zdrowie.lua" type="client"/>
</meta>


function Zdrowie (thePlayer)
setElementHealth (thePlayer100 )
end
addCommandHandler "zdrowie"Zdrowie )


Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-19, 15:16


Remix110

Pewna osóbka :3






Wiek: 40
Na forum: 3663 dni
Posty: 291
Nick w MP: GoodNight

Piwa: 15

Respekt: 51

Nie dzia?a ;-;

A meta na client czy server?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2017-01-19, 15:34


amited







Wiek: 26
Na forum: 3714 dni
Posty: 1233
Nick w MP: Amited

Piwa: 512

Respekt: 466
Respekt: 466

Strona servera. A tutaj masz ?e gracz mo?e sobie ustawi? tyle hp ile wpisa?.

function Health(playercommandamount)
    setElementHealth(playertonumber(amount))
end
addCommandHandler("set"Health)


Podpis
"amited" napisał/a:
Postaw piwo autorowi tego posta
 

 
Tagi: prośby :: przerobienie :: skryptu
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Zasoby do MTA » PROŚBY O PRZEROBIENIE SKRYPTU Odpowiedz do tematu

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