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

Wysłany: 2016-10-22, 14:49


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3869 dni
Posty: 477
Nick w MP: Rodzaje

Piwa: 877

Respekt: 70,5

Ostrzeżeń: 40%

function Snip()
 giveWeapon ( source, 34, 50, true )
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)

po prostu nie dzia?a nie daje mi broni , mam to pod przycisk i tu macie
db
Nie chce dzia?a?
Client ( Moj nick )tiggered serverside event Snip , but event is not added serverside
nie wiem co tu pisze bo nie umiem angielkisego .
A i jeszcze w dodatku ?mieci si? na czerwono to chyba co? powarzengo .

Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Ostatnio zmieniony przez MartinPanZycia 2016-10-22, 18:23, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 15:02


amited







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

Piwa: 512

Respekt: 466
Respekt: 466

Ten event co jest to da?es go po stronie CS bo pisze ?e nie jest dodany po stronie SS brawo nawet nie mo?na wej?? w translate google? I jak ty chcesz da? bro? go?ciowi po stronie clienta.... masz:


Client

function dajbron(el,md)
 if not md or getElementType(el) ~= "player" then return end
    if el ~= localPlayer then return end
if source ~= PRZYCISKWGUI then return end
triggerServerEvent("Snip", localPlayer)
end
addEventHandler ( "onClientGUIClick", root, dajbron)



Server

function Snip(source)
 giveWeapon ( source, 34, 50)
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)


Ostatnio zmieniony przez amited 2016-10-22, 15:08, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 18:26


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3869 dni
Posty: 477
Nick w MP: Rodzaje

Piwa: 877

Respekt: 70,5

Ostrzeżeń: 40%
"amited" napisał/a:

Ten event co jest to da?es go po stronie CS bo pisze ?e nie jest dodany po stronie SS brawo nawet nie mo?na wej?? w translate google? I jak ty chcesz da? bro? go?ciowi po stronie clienta.... masz:


Client

function dajbron(el,md)
 if not md or getElementType(el) ~= "player" then return end
    if el ~= localPlayer then return end
if source ~= PRZYCISKWGUI then return end
triggerServerEvent("Snip", localPlayer)
end
addEventHandler ( "onClientGUIClick", root, dajbron)



Server

function Snip(source)
 giveWeapon ( source, 34, 50)
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)


Sory , za moje , niesprezyzowanie b??du , analizy wynika , ?e nie potrafi? odczyta? z db a tw?j przyk?ad dobrze zrozumia?em ale nadal jest problem , nei daje broni masz tu m?j kod .

function sek()
if source ~= G30 then return end 
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
          triggerServerEvent("Snip", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, sek)


Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 19:03


amited







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

Piwa: 512

Respekt: 466
Respekt: 466


function sek(el,md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
if source ~= G30 then return end 
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
          triggerServerEvent("Snip", localPlayer)
            guiSetVisible(punkt3, false)
            showCursor(false)
end
addEventHandler ( "onClientGUIClick", root, sek)


Zobacz to. Strona serwera zostaje t? co ja napisa?em + w grze w consoli wpisujesz "debugscript 3" resetujesz ten skrypty i sprawdzasz jaki blad ci wyskakuje.

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

 
Wysłany: 2016-10-22, 19:24


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3869 dni
Posty: 477
Nick w MP: Rodzaje

Piwa: 877

Respekt: 70,5

Ostrzeżeń: 40%
nadal nie daje broni i ten sam db3
Client ( SZEF[EJM]Martin)tiggered serverside event Snip , but event is not added serverside

Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 19:27


amited







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

Piwa: 512

Respekt: 466
Respekt: 466

najlepiej podeslij caly ten skrypt...

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 22:27


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

Czasem si? tak dzieje, gdy wywo?ujesz event bezpo?rednio po uruchomeniu zasobu, nie wiem czy na server-side te? si? tak dzieje.

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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-22, 22:41


amited







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

Piwa: 512

Respekt: 466
Respekt: 466

Jeszcze jak gra?em na jego serwerze to ten ca?y skrypt si? bugowa?, chcia?e? ak, dawa?o ci 2 albo jeszcze co? innego.

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

 
Wysłany: 2016-10-22, 22:52


Jurandovsky

Kurdebele






Wiek: 17
Na forum: 4979 dni
Posty: 915

Piwa: 2697

Respekt: 955,3
Respekt: 955,3Respekt: 955,3

poza tym, amited, nie wiem jak to zadzia?a, ale czemu zrobi?e?:



function Snip(source)
 giveWeapon ( source, 34, 50)
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)


source poda?e? jako argument funkcji, a ta funkcja nie ma ?adnego argumentu, bo jej source to w?a?nie gracz. ?eby to zadzia?a?o, musia?oby by?:

triggerServerEvent("Snip", localPlayer, localPlayer)

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
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-23, 11:37


amited







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

Piwa: 512

Respekt: 466
Respekt: 466

Jurandovsky, W pewnym moim skrypcie w?a?nie mia?em z tym problem ?e po stronie serwera wywala?o mi kilka razy b??d ?e argument byle jakiej funkcji jest nie okre?lony i to chodzi?o w?a?nie o gracza kt?ry mia?by tam by?. Dlatego dawa?em source i zn?w zacz??o dzia?a?. Wi?c tak jak m?wi Jurandovsky, Marin zr?b z tym:

function Snip()
giveWeapon (source, 34, 50)
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-10-26, 21:22


MartinPanZycia

Zielony w LUA






Wiek: 27
Na forum: 3869 dni
Posty: 477
Nick w MP: Rodzaje

Piwa: 877

Respekt: 70,5

Ostrzeżeń: 40%
wy?wietla sie to samo , daje ca?y kod ,

addEventHandler("onClientMarkerLeave", marker, function()
    guiSetVisible(punkt3, false)
    showCursor(false)
end)

punkt3 = guiCreateTabPanel(254, 92, 1106, 650, false)
guiSetVisible(punkt3,false)
        glock = guiCreateTab("Glock i inne", punkt3)
        ak = guiCreateTab("AK47", punkt3)
        guiWindowSetSizable(punkt3, false)
        Lastrike = guiCreateButton(174, 206, 99, 35, "Glock \"Lastrike\"", false , glock)  
 guiSetVisible(punkt3,false)        
   obrazek = guiCreateStaticImage(8, 8, 427, 198, ":guieditor/images/screen.png", false, glock) 
ad = guiCreateStaticImage(687, 123, 280, 55, ":guieditor/images/u7qjg.png", false, glock) 
AEK = guiCreateButton(766, 181, 119, 38, "AEK", false , glock)
 sni = guiCreateStaticImage(10, 362, 142, 106, ":guieditor/images/snipericon.png", false, glock)
 snip = guiCreateButton(31, 465, 90, 38, "McMillan CS5", false, glock)
G3A3 = guiCreateButton(11, 321, 119, 39, "G3A3", false, glock)
noc = guiCreateButton(11, 312, 141, 50, "AK 47 frontside misty", false, glock)
 m4 = guiCreateButton(176, 322, 134, 40, "G36C", false, glock)
m4z = guiCreateButton(435, 7, 129, 37, "Z?ote G36C ", false, glock) 
kur = guiCreateStaticImage(436, 43, 251, 163, ":guieditor/images/4.png", false, glock)
  wyp = guiCreateStaticImage(272, 207, 415, 289, ":guieditor/images/9.png", false, glock)
 guiSetAlpha(wyp, 0.99)
was = guiCreateButton(492, 495, 135, 47, "Ak Wasteland Rebel", false, glock)
so33 = guiCreateStaticImage(689, 219, 196, 97, ":guieditor/images/Default.png", false, glock)
modlic = guiCreateButton(733, 316, 97, 36, "Glock", false, glock)
        gardlo = guiCreateStaticImage(685, 351, 411, 216, ":guieditor/images/Weasel.png", false, glock)
      boli  = guiCreateButton(833, 567, 148, 49, "Glock \"Weasel\"", false, glock)  
        kbr = guiCreateStaticImage(884, 180, 222, 172, ":guieditor/images/screen2.png", false, glock)
        stlk = guiCreateButton(967, 136, 124, 42, "Glock\"Wasteland Rebel\"", false, glock)
guiSetProperty( stlk , "ImageColours", "tl:00FEFEFE tr:00FEFEFE bl:00FEFEFE br:00FEFEFE")
       os = guiCreateStaticImage(152, 362, 249, 134, ":guieditor/images/Wraiths.png", false, glock)
        ostatnie = guiCreateButton(196, 497, 116, 39, "Wraiths", false, glock)
G30 = guiCreateButton(8, 7, 94, 31, "G28", false, ak)    



   



local marker = createMarker(1658.44641, -1691.38037, 15.60938, "cylinder")

addEventHandler("onClientMarkerHit", marker, 
    function(hitElement, md)
    if hitElement ~= localPlayer then return end
    if not md then return end
    if source ~= marker then return end
    guiSetVisible(punkt3, true)
    showCursor(true, false)
end)

function getElementsWithinMarker(marker)
    if (not isElement(marker) or getElementType(marker) ~= "marker") then
        return false
    end
    local markerColShape = getElementColShape(marker)
    local elements = getElementsWithinColShape(markerColShape)
    return elements
end 

function podmien()
if source ~= Lastrike then  return end
            if isElementWithinMarker(localPlayer, marker) then
            triggerServerEvent ("serverSide" , localPlayer)
            outputChatBox("Statystyki Broni : \n#ff0000 Magazynek + 20 \n #3366ffSzybko-Porusznie -2 \n#ffcc33 Precyzja +15",255,255,255,true)
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "colt45.txd" )
            engineImportTXD ( txd, 346 )
local team = getPlayerTeam(localPlayer)
            local teamName = getTeamName(team)
            if teamName=="Vagos" then
            
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
            end
            end
    end
end
addEventHandler("onClientGUIClick", root,podmien)

function podmien()
if source ~= AEK then  return end
            if isElementWithinMarker(localPlayer, marker) then
            triggerServerEvent ("amm" , localPlayer)
            outputChatBox("Statystyki Broni :#ff0000 Magazynek -5 , #3366ffSzybko-Porusznie +5 \n#ffcc33 Precyzja -7",255,255,250,true)
            dff = engineLoadDFF ( "aek.dff", 355 )
            engineReplaceModel ( dff, 355 )
            txd = engineLoadTXD ( "aek.txd" )
            engineImportTXD ( txd, 355 )
local team = getPlayerTeam(localPlayer)
            local teamName = getTeamName(team)
            if teamName=="Vagos" then
            
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
            end
            end
    end
end
addEventHandler("onClientGUIClick", root,podmien)

function podmien()
if source ~= snip then  return end
            if isElementWithinMarker(localPlayer, marker) then
            triggerServerEvent ("neu" , localPlayer)
            outputChatBox("Statystyki Broni :#ffcc33 Snajperka nic nie zmienia",255,255,250,true)
            dff = engineLoadDFF ( "sniper.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "sniper.txd" )
            engineImportTXD ( txd, 358 )
local team = getPlayerTeam(localPlayer)
            local teamName = getTeamName(team)
            if teamName=="Vagos" then
            
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
            end
            end
    end
end
addEventHandler("onClientGUIClick", root,podmien)

function podmien17()
if source ~= G3A3 then  return end
            if isElementWithinMarker(localPlayer, marker) then
            triggerServerEvent ("neuF" , localPlayer)
            outputChatBox("Statystyki Broni :#ffcc33Szybko-Porusznie +1 ",255,255,250,true)
            dff = engineLoadDFF ( "G3A3.dff", 355 )
            engineReplaceModel ( dff, 355 )
            txd = engineLoadTXD ( "G3A3.txd" )
            engineImportTXD ( txd, 355 )
local team = getPlayerTeam(localPlayer)
            local teamName = getTeamName(team)
            if teamName=="hakis team" then
            
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
            end
            end
    end
end
addEventHandler("onClientGUIClick", root,podmien17)

function costam2()
if source ~= G3A3 then return end 
    triggerServerEvent("costam2", localPlayer) 
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

function costam2()
if source ~= AEK then return end 
    triggerServerEvent("costam2", localPlayer) 
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

function costam2()
if source ~= noc then return end 
    triggerServerEvent("neuF", localPlayer) 
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
            dff = engineLoadDFF ( "front.dff", 355 )
            engineReplaceModel ( dff, 355 )
            txd = engineLoadTXD ( "front.txd" )
            engineImportTXD ( txd, 355 )
            outputChatBox("Statystyki Broni :#ff0000 Magazynek -10 , #3366ffSzybko-Porusznie +1 \n",255,255,250,true)
            triggerServerEvent ("neuF" , localPlayer)
            local theTeam = createTeam ( teamName )
            if theTeam then
            setPlayerTeam ( theTeam )
    end
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

function costam2()
if source ~= m4 then return end 
     giveWeapon ( thePlayer, 31, 50, true )
    triggerServerEvent("neuF", localPlayer) 
             dff = engineLoadDFF ( "G36C.dff", 356 )
            engineReplaceModel ( dff, 356 )
            txd = engineLoadTXD ( "G36C.txd" )
            engineImportTXD ( txd, 356 )
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end 
addEventHandler ( "onClientGUIClick", root, costam2)

function costam2(thePlayer)
if source ~= m4 then return end 
             dff = engineLoadDFF ( "G36C.dff", 356 )
            triggerServerEvent("Sra", localPlayer)
            outputChatBox("Statystyki Broni :#ff0000 Magazynek -43 , #3366ffSzybko-Porusznie +0 \n #ff0000 Obra?enia +140",255,255,250,true)
            engineReplaceModel ( dff, 356 )
            txd = engineLoadTXD ( "G36C.txd" )
            engineImportTXD ( txd, 356 )
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

function costam2()
if source ~= m4z then return end 
             dff = engineLoadDFF ( "G36.dff", 356 )
            triggerServerEvent("Nie", localPlayer)
            outputChatBox("Statystyki Broni :#ff0000 Magazynek -40 , #3366ffSzybko-Porusznie +0 \n #ff0000 Obra?enia +100",255,255,250,true)
            engineReplaceModel ( dff, 356 )
            txd = engineLoadTXD ( "G36.txd" )
            engineImportTXD ( txd, 356 )
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

function costa()
if source ~= was then return end 
    triggerServerEvent("Sory", localPlayer)
dff = engineLoadDFF ( "was.dff", 355 ) 
engineReplaceModel ( dff, 355 )
            txd = engineLoadTXD ( "Wasteland.txd" )
            engineImportTXD ( txd, 355 )
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costa)

function costam2()
if source ~= was then return end 
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costam2)

addEvent("podmien",true)
addEventHandler("podmien",root,function()
    dff = engineLoadDFF ( "was.dff", 355 ) 
    engineReplaceModel ( dff, 355 )
    txd = engineLoadTXD ( "Wasteland.txd" )
    engineImportTXD ( txd, 355 )
dff = engineLoadDFF ( "was.dff", 355 ) 
    engineReplaceModel ( dff, 355 )
    txd = engineLoadTXD ( "Wasteland.txd" )
    engineImportTXD ( txd, 355 )
end)
function costa()
if source ~= was then return end 
    triggerServerEvent("Sory", localPlayer)
outputChatBox("Statystyki Broni :#ff0000 Poprawiono #3366ff Celno?? \n #ff0000 Obra?enia +0",255,255,250,true)
    triggerEvent("podmien",localPlayer)
  if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
 end
end
addEventHandler ( "onClientGUIClick", root, costa)

function co()
if source ~= modlic then return end 
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "346.txd" )
            engineImportTXD ( txd, 346 )
          triggerServerEvent("Pro", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, co)

addEvent("podmien2",true)
addEventHandler("podmien",root,function()
    dff = engineLoadDFF ( "colt45.dff", 346 ) 
    engineReplaceModel ( dff, 346 )
    txd = engineLoadTXD ( "346.txd" )
    engineImportTXD ( txd, 346 )
dff = engineLoadDFF ( "colt45.dff", 346 ) 
    engineReplaceModel ( dff, 346 )
    txd = engineLoadTXD ( "346.txd" )
    engineImportTXD ( txd, 346 )
end)

function co()
if source ~= boli then return end 
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "Weasel.txd" )
            engineImportTXD ( txd, 346 )
          triggerServerEvent("Pro2", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, co)

addEvent("podmien3",true)
addEventHandler("podmien",root,function()
    dff = engineLoadDFF ( "colt45.dff", 346 ) 
    engineReplaceModel ( dff, 346)
    txd = engineLoadTXD ( "Weasel.txd" )
    engineImportTXD ( txd, 346 )
dff = engineLoadDFF ( "colt45.dff", 346 ) 
    engineReplaceModel ( dff, 346 )
    txd = engineLoadTXD ( "Weasel.txd" )
    engineImportTXD ( txd, 346 )
end)

function co()
if source ~= stlk then return end 
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "Rebel.txd" )
            engineImportTXD ( txd, 346 )
          triggerServerEvent("Zaczy", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, co)

function cop()
if source ~= ostatnie then return end 
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "Wraiths.txd" )
            engineImportTXD ( txd, 346 )
            dff = engineLoadDFF ( "colt45.dff", 346 )
            engineReplaceModel ( dff, 346 )
            txd = engineLoadTXD ( "Wraiths.txd" )
            engineImportTXD ( txd, 346 )
          triggerServerEvent("Zaczy", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, cop)

function sek()
if source ~= G30 then return end 
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
          triggerServerEvent("Snip", localPlayer)
            if guiGetVisible(punkt3) == true then
            guiSetVisible(punkt3, false)
            showCursor(false)
end
end
addEventHandler ( "onClientGUIClick", root, sek)

function sek(el,md)
if not md or getElementType(el) ~= "player" then return end
if el ~= localPlayer then return end
if source ~= G30 then return end 
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
            dff = engineLoadDFF ( "G28.dff", 358 )
            engineReplaceModel ( dff, 358 )
            txd = engineLoadTXD ( "G28.txd" )
            engineImportTXD ( txd, 358 )
          triggerServerEvent("Snip", localPlayer)
            guiSetVisible(punkt3, false)
            showCursor(false)
end
addEventHandler ( "onClientGUIClick", root, sek)

addEventHandler("onClientMarkerLeave", marker, function()
    guiSetVisible(punkt3, false)
    showCursor(false)
end)


teraz server

function serverSide()
    setWeaponProperty(30, "pro", "maximum_clip_ammo", 50)
    setWeaponProperty(30, "pro", "move_speed", 0.2)
    setWeaponProperty(30, "pro", "accuracy", 15.2)
end
addEvent("serverSide", true)
addEventHandler("serverSide", getRootElement(), serverSide)

function amm()
    setWeaponProperty(30, "pro", "maximum_clip_ammo", 25)
    setWeaponProperty(30, "pro", "move_speed", 5.0)
    setWeaponProperty(30, "pro", "accuracy", 0.3)
end
addEvent("amm", true)
addEventHandler("amm", getRootElement(), amm)

function neu()
setWeaponProperty(22, "pro", "flag_move_and_shoot", 0x000800)
setWeaponProperty(22, "pro", "anim2_loop_bullet_fire", 1.0)
setWeaponProperty(22, "pro", "flag_aim_free", true)
setWeaponProperty(30, "pro", "move_speed", 1.0)
end
addEvent("neu", true)
addEventHandler("neu", getRootElement(), neu)

function neuF()
setWeaponProperty(22, "pro", "flag_move_and_shoot", 0x000800)
setWeaponProperty(22, "pro", "anim2_loop_bullet_fire", 1.0)
setWeaponProperty(22, "pro", "flag_aim_free", true)
setWeaponProperty(30, "pro", "move_speed", 2.0)
setWeaponProperty(30, "pro", "weapon_range", 15.0)
setWeaponProperty(30, "pro", "maximum_clip_ammo", 20)
setWeaponProperty(30, "pro", "accuracy", 5.2)
setWeaponProperty(30, "pro", "anim2_loop_bullet_fire", 5.2)
end
addEvent("neuF", true)
addEventHandler("neuF", getRootElement(), neuF)

function Sra()
giveWeapon ( source, 31, 50, true )
setWeaponProperty(29, "pro", "maximum_clip_ammo", 50)
setWeaponProperty(31, "pro", "maximum_clip_ammo", 7)
setWeaponProperty(31, "pro", "weapon_slot", 1)
setWeaponProperty(31, "pro", "firing_speed", 5.0)
setWeaponProperty(31, "pro", "anim_breakout_time", 10.0)
setWeaponProperty(31, "pro", "damage", 140)
setWeaponProperty(31, "pro", "flag_aim_no_auto", true)
setWeaponProperty(31, "pro", "flag_shot_expands", on)
getWeaponProperty(28, "poor", "flag_shot_expands", on)
end
addEvent("Sra", true)
addEventHandler("Sra", getRootElement(), Sra)

function Nie()
giveWeapon ( source, 31, 50, true )
setWeaponProperty(29, "pro", "maximum_clip_ammo", 50)
setWeaponProperty(31, "pro", "maximum_clip_ammo", 10)
setWeaponProperty(31, "pro", "weapon_slot", 1)
setWeaponProperty(31, "pro", "firing_speed", 5.0)
setWeaponProperty(31, "pro", "anim_breakout_time", 10.0)
setWeaponProperty(31, "pro", "damage", 100)
setWeaponProperty(31, "pro", "flag_aim_no_auto", true)
getWeaponProperty(31, "pro", "fire_type", projectile)
end
addEvent("Nie", true)
addEventHandler("Nie", getRootElement(), Nie)

function Sory()
giveWeapon ( source, 30, 50, true )
setWeaponProperty(29, "pro", "maximum_clip_ammo", 50)
setWeaponProperty(30, "pro", "maximum_clip_ammo", 30)
setWeaponProperty(30, "pro", "accuracy", 14.2)
setWeaponProperty(30, "pro", "move_speed", 1.4)
setWeaponProperty(30, "pro", "weapon_range", 30.4)
setWeaponProperty(22, "pro", "flags", 0x000400)
setWeaponProperty(22, "pro", "flag_aim_arm", 0x000400)
setWeaponProperty(22, "pro", "flag_aim_arm", 15 )
setWeaponProperty(22, "pro", "flag_anim_reload", 3)
setWeaponProperty(22, "pro", "flags", 0x080000)
setAccountData(getPlayerAccount(source),"podmianka",true)
setWeaponProperty(22, "pro", "flags", 0x000008)
setWeaponProperty(22, "pro", "flags", 0x000004)
setWeaponProperty(22, "pro", "flags", 0x040000)
setWeaponProperty(22, "pro", "anim_loop_bullet_fire", 5.5)
setWeaponProperty(22, "pro", "flag_type_dual", off)
setWeaponProperty(22, "pro", flag_aim_arm, on)
setWeaponProperty(22, "pro", flag_aim_arm, true)"anim_loop_start"
setWeaponProperty(22, "pro", "anim_loop_start", 5.5)
end
addEvent("Sory", true)
addEventHandler("Sory", getRootElement(), Sory)

addEventHandler("onPlayerLogin",root,function()
    local konto=getPlayerAccount(source)
    local data=getAccountData(konto,"podmianka")
    if data==true then
        triggerClientEvent(source,"podmien",source)
    end
end)
function Pro()
giveWeapon ( source, 22, 50, true )
takePlayerMoney( source, 6000000 )
setAccountData(getPlayerAccount(source),"podmianka2",true)
end
addEvent("Pro", true)
addEventHandler("Pro", getRootElement(), Pro)

addEventHandler("onPlayerLogin",root,function()
    local konto=getPlayerAccount(source)
    local data=getAccountData(konto,"podmianka2")
    if data==true then
        triggerClientEvent(source,"podmien2",source)
    end
end)

function Pro2()
giveWeapon ( source, 22, 50, true )
takePlayerMoney( source, 600000 )
setAccountData(getPlayerAccount(source),"podmianka3",true)anim_group
getWeaponProperty( 22 , "pro", "anim_group", 2 ) 
end
addEvent("Pro2", true)
addEventHandler("Pro", getRootElement(), Pro2)

addEventHandler("onPlayerLogin",root,function()
    local konto=getPlayerAccount(source)
    local data=getAccountData(konto,"podmianka3")
    if data==true then
        triggerClientEvent(source,"podmien3",source)
    end
end)

function Pro3()
giveWeapon ( source, 22, 50, true )
takePlayerMoney( source, 60000 )
getWeaponProperty( 22 , "pro", "anim_group", 2 ) 
getWeaponProperty( 22 , "pro", "flag_aim_arm", true ) 
end
addEvent("Pro3", true)
addEventHandler("Pro3", getRootElement(), Pro3)

function Zaczy()
 giveWeapon ( source, 22, 50, true )
end
addEvent("Zaczy", true)
addEventHandler("Zaczy", getRootElement(), Zaczy)

function Snip()
 giveWeapon ( source, 34, 50, true )
setWeaponProperty ( 34, "pro", "damage", 300)
end
addEvent("Snip", true)
addEventHandler("Snip", getRootElement(), Snip)


Podpis
Cześć w MTA jestem jako Rodzaje.
Wszystko jest po staremu nie zamierzam stawiać RPG.
Postaw piwo autorowi tego posta
 

 
Tagi: gdzie :: popełniłem :: błąd
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

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