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

Wysłany: 2014-11-29, 11:47


XQward







Wiek: 25
Na forum: 4485 dni
Posty: 56



Respekt: 50

Mam oto taki kod na to,gdy jak wejdziesz w pickup to ci nadaje skin.Wszystko dzia?a poprawnie tylko chc? aby by?o,gdy jak wejdziesz 2 raz w pickup to nadaje ci starego skina.Dam piwko :)

ID_SKINA = 286

pickup = createPickup ( 261.78, 110.51, 1004.62, 3, 1275, 0, 0 ) 
setElementInterior (pickup, 10)

addEventHandler ( "onPickupHit", pickup, function(thePlayer,matchingDimension)
local accName = getAccountName ( getPlayerAccount ( thePlayer ) )
if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Policja" ) ) then
setElementModel ( thePlayer, ID_SKINA ) 
end
end)


Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 12:15


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3



pickup = createPickup ( 261.78, 110.51, 1004.62, 3, 1275, 0, 0 ) 
setElementInterior (pickup, 10)

addEventHandler ( "onPickupHit", pickup, function(element)
    if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "Policja" ) ) then
        if getAccountData ( getPlayerAccount ( element ), "stary:skin" ) then
            id = tonumber ( getAccountData ( getPlayerAccount ( element ), "stary:skin" ) )
            setElementModel ( element, id ) 
        else
            skin = tonumber ( getElementModel ( element ) )
            setAccountData ( getPlayerAccount ( element ), "stary:skin", skin )
            setElementModel ( element, 286 )
end
    end
end)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 12:55


XQward







Wiek: 25
Na forum: 4485 dni
Posty: 56



Respekt: 50

Dzia?a tylko problem w tym ?e jak mam skin ID 0 i gdy wejd? jeszcze raz to nie nadaje mi skina 286.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 14:19


MeeShuffle

Programista/Grafik






Wiek: 33
Na forum: 4535 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8578

Respekt: 535,3
Respekt: 535,3

pickup = createPickup ( 261.78, 110.51, 1004.62, 3, 1275, 0, 0 ) 
setElementInterior (pickup, 10)

addEventHandler ( "onPickupHit", pickup, function(element)
    if isObjectInACLGroup ("user."..getAccountName ( getPlayerAccount ( element ) ), aclGetGroup ( "Policja" ) ) then
        if getAccountData ( getPlayerAccount ( element ), "stary:skin" ) then
            id = tonumber ( getAccountData ( getPlayerAccount ( element ), "stary:skin" ) )
            setElementModel ( element, id ) 
            setAccountData ( getPlayerAccount ( element ), "stary:skin", false )
        else
            skin = tonumber ( getElementModel ( element ) )
            setAccountData ( getPlayerAccount ( element ), "stary:skin", skin )
            setElementModel ( element, 286 )
end
    end
end)


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-11-29, 18:08


XQward







Wiek: 25
Na forum: 4485 dni
Posty: 56



Respekt: 50

Skrypt dzia?a poprawnie.Dzi?ki leci :piwo:

Postaw piwo autorowi tego posta
 

 
Tagi: pickup :: skin
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Pickup Skin 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