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

Wysłany: 2015-07-13, 16:33


sebik2303

Mapper :)






Wiek: 25
Na forum: 4301 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

Witam, chcia?bym przerobi? sw?j skrypt na tuning, lecz ma par? wad i musz? je zlikwidowa? :) Dam kod

 function addwheels ( sourcePlayer, command )
    theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
    if ( theVehicle ) then 
        addVehicleUpgrade ( theVehicle, 1098 ) 
        takePlayerMoney(sourcePlayer,7000)
        outputChatBox ( "Zamontowano cz??? w poje?dzie.", source, 255, 255, 255, true )
    end
end
addCommandHandler ( "dodaj.access", addwheels )
 
function remwheels ( sourcePlayer, command )
    theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
    if ( theVehicle ) then
        removeVehicleUpgrade ( theVehicle, 1098 )
        givePlayerMoney(sourcePlayer,7000)
        outputChatBox ( "Zdemontowano Cz??? w poje?dzie.", source, 255, 255, 255, true )
    end
end
addCommandHandler ( "usun.access", remwheels ) 


Wi?c chcia?bym da? aby tylko w markerze dzia?a?o. Wi?c na pocz?tku skryptu musz? dopisa? :

mech_marker = createMarker(-145.81640625, 1165.3720703125, 19.795249938965, "cylinder", 0, 0, 0, 0, 130)

( Chyba tak jak co? ?le da?em prosz? mnie poprawi? )

Chcia?bym te? aby tylko ACL mia? Mech_FC

if not isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(plr)), aclGetGroup ( "Mechanik_FC" ) )

( Chyba tak jak co? ?le da?em prosz? mnie poprawi? )

•Oraz jak kto? ma kas? poni?ej 0 to nie mo?e zamontowa?
•Oraz je?eli jest ju? tune to nie mo?e go 2 raz zamontowa?

Za pomoc daj? :arrow: :piwo:

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 16:55


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Nie wiem czy o to Ci chodzi?o.
mech_marker = createMarker(-145.81640625, 1165.3720703125, 19.795249938965, "cylinder", 0, 0, 0, 0, 130)

 function addwheels ( sourcePlayer, command )
 if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup ( "Mechanik_FC" ) ) then
     if isObjectWithinMarker(sourcePlayer,mech_marker) then
        theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
        if ( theVehicle ) then 
            addVehicleUpgrade ( theVehicle, 1098 ) 
            takePlayerMoney(sourcePlayer,7000)
            outputChatBox ( "Zamontowano cz??? w poje?dzie.", source, 255, 255, 255, true )
        end
     end
  end
end
addCommandHandler ( "dodaj.access", addwheels )
 
function remwheels ( sourcePlayer, command )
 if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup ( "Mechanik_FC" ) ) then
     if isObjectWithinMarker(sourcePlayer,mech_marker) then
        theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
        if ( theVehicle ) then
            removeVehicleUpgrade ( theVehicle, 1098 )
            givePlayerMoney(sourcePlayer,7000)
            outputChatBox ( "Zdemontowano Cz??? w poje?dzie.", source, 255, 255, 255, true )
        end
     end
  end
end
addCommandHandler ( "usun.access", remwheels ) 


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 18:04


sebik2303

Mapper :)






Wiek: 25
Na forum: 4301 dni
Posty: 298
Nick w MP: sebik2303

Piwa: 899

Respekt: 55,3

Mam 1 DB3


[ Dodano: 2015-07-13, 18:10 ]
Dodam i? 9 linijka to
     if isObjectWithinMarker(sourcePlayer,mech_marker) then


Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 18:35


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

marker = createMarker(-145.81640625, 1165.3720703125, 19.795249938965, "cylinder", 0, 0, 0, 0, 130)

 function addwheels ( sourcePlayer, command )
 if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup ( "Mechanik_FC" ) ) then
     if isElementWithinMarker(sourcePlayer,marker) then
        theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
        if ( theVehicle ) then 
            addVehicleUpgrade ( theVehicle, 1098 ) 
            takePlayerMoney(sourcePlayer,7000)
            outputChatBox ( "Zamontowano cz??? w poje?dzie.", source, 255, 255, 255, true )
        end
     end
  end
end
addCommandHandler ( "dodaj.access", addwheels )
 
function remwheels ( sourcePlayer, command )
 if isObjectInACLGroup ( "user." .. getAccountName(getPlayerAccount(sourcePlayer)), aclGetGroup ( "Mechanik_FC" ) ) then
     if isElementWithinMarker(sourcePlayer,marker) then
        theVehicle = getPlayerOccupiedVehicle ( sourcePlayer )
        if ( theVehicle ) then
            removeVehicleUpgrade ( theVehicle, 1098 )
            givePlayerMoney(sourcePlayer,7000)
            outputChatBox ( "Zdemontowano Cz??? w poje?dzie.", source, 255, 255, 255, true )
        end
     end
  end
end
addCommandHandler ( "usun.access", remwheels ) 


Ostatnio zmieniony przez Maximerr 2015-07-13, 21:42, w całości zmieniany 1 raz  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 21:36


Tostuch







Wiek: 28
Na forum: 5072 dni
Posty: 483
Nick w MP: Tost

Piwa: 137

Respekt: 110
Respekt: 110

isElementWithinMarker* dziwi? si? ?e DB3 nie wywali?o od razu b??du

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-07-13, 21:42


Maximerr

Programmer PHP, LUA






Wiek: 25
Na forum: 4568 dni
Posty: 548

Piwa: 1051

Respekt: 365,3
Respekt: 365,3Respekt: 365,3Respekt: 365,3Respekt: 365,3

Tostuch, ah, rzeczywi?cie. Ju? poprawiam.

Postaw piwo autorowi tego posta
 

 
Tagi: tuning :: pojazdu
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