Wysłany: 2018-08-22, 10:25
AsterBonzo
Otwórz ogień
Wiek: 20 Na forum: 2968 dni Posty: 187
Nick w MP: Hirahi
Piwa : 60
Tak nie dzia?a mi branie skina pojawia marker wchodz? w niego i nie daje skina, nie wiem dlaczego
kodzik:
local marker = createMarker (- 6727.30 , - 1478.71 , 97.26 - 1 , 'cylinder' , 2 , 50 , 90 , 255 , 75 )
setElementDimension ( marker , 0 )
setElementInterior ( marker , 0 )
local licz = {}
local t = createElement ( 'text' )
setElementData ( t , 'name' , 'Los Santos Police Departament\nLSPD\nRozpocz?cie s?u?by' )
setElementDimension ( t , 0 )
setElementInterior ( t , 0 )
setElementPosition ( t ,- 6727.30 , - 1478.71 , 97.26 )
function isPlayerInPoliceFaction ( plr )
local uid = getElementData ( plr , 'player:uid' )
if not uid then return end
local result = exports [ 'ogrpg-db' ]: dbGet ( 'SELECT 1 FROM ogrpg_factions WHERE code=? AND uid=? LIMIT 1;' , "LSPD" , uid )
if result [ 1 ] then
return true
else
return false
end
end
addEventHandler ( 'onMarkerHit' , marker , function( el , md )
if isPlayerInPoliceFaction ( el ) then
if not getElementData ( el , 'player:duty' ) then
setElementData ( el , "last:skin" , getElementModel ( el ))
setElementModel ( el , 71 )
outputChatBox ( "Rozpocz??e? prac? jako Policjant!" , el , 50 , 90 , 200 )
exports [ 'frakcja' ]: rozpocznijnaliczanie ( el )
setElementData ( el , 'player:duty' , 'LSPD' )
local rank = exports [ 'frakcja' ]: getPlayerFactionRank ( el , 'LSPD' )
setElementData ( el , "player:rank" , rank )
giveWeapon ( el , 23 , 9999 )
setElementData ( el , "last:nick" , getPlayerName ( el ))
setElementData ( el , "last:color" , tostring ( getPlayerNametagColor ( el )))
setPlayerName ( el , "#0000CD" .. getPlayerName ( el ): gsub ( "#%x%x%x%x%x%x" , "" ))
executeCommandHandler ( "setblipcolor" , el , 0 , 0 , 205 )
else
takeWeapon ( el , 23 )
outputChatBox ( "Zako?czy?e? prac? jako Policjant!" , el , 50 , 90 , 200 )
exports [ 'frakcja' ]: zatrzymajnaliczanie ( el )
setElementData ( el , 'player:duty' , false )
setElementData ( el , "player:rank" , false )
local skin = getElementData ( el , "last:skin" )
setElementModel ( el , skin )
setPlayerName ( el , getElementData ( el , "last:nick" ))
executeCommandHandler ( "setblipcolor" , el , 255 , 255 , 255 )
end
else
outputChatBox ( '* Nie jeste? zatrudniony jako Policjant!' , el , 255 , 0 , 0 )
end
end )
function naliczanie ( el )
if isElement ( el ) then
local x = getElementData ( el , "player:workinjob" ) or 0
setElementData ( el , "player:workinjob" , x + 1 )
else
if isTimer ( licz [ el ]) then
killTimer ( licz [ el ])
licz [ el ] = nil
end
end
end
local bronie2 = createMarker ( - 1308.94 ,- 148.07 , 14.16 - 0.90 , "cylinder" , 1.0 , 0 , 255 , 0 , 255 )
setElementDimension ( bronie2 , 110 )
setElementInterior ( bronie2 , 10 )
local t = createElement ( "text" )
setElementData ( t , "name" , "Tutaj we?miesz swoje wyposa?enie!" )
setElementPosition ( t ,- 1308.94 ,- 148.07 , 14.16 )
setElementDimension ( t , 110 )
setElementInterior ( t , 10 )
function bronie11 ( hitElement , matchingDimension )
if source == bronie2 then
if getElementData ( hitElement , "player:duty" ) == "LSPD" then
if getElementData ( hitElement , 'player:rank' ) <= 4 then hitElement : outputChat ( "Jeste? aktualnie podczas akademii, nie przys?uguje Ci wyposa?enie!" ) return end
outputChatBox ( "Wzi??e? swoje wyposa?enie!" , hitElement )
giveWeapon ( hitElement , 32 , 100000 )
else
outputChatBox ( "Nie jestes policjantem!" , hitElement )
end
end
end
addEventHandler ( "onMarkerHit" , bronie2 , bronie11 )
local marker = createMarker ( - 6754.97 , - 1468.03 , 96.23 , "cylinder" , 1.0 , 255 , 255 , 255 )
setElementDimension ( marker , 0 )
function skin ( thePlayer )
if source == marker then
if getElementData ( thePlayer , "player:duty" ) == "SFPD" then
setElementModel ( thePlayer , 280 )
else return outputChatBox ( "* Nie jeste? policjantem lub nie jeste? na s?u?bie" , thePlayer ) end
else return end
end
addEventHandler ( "onMarkerHit" , getRootElement (), skin )
Za pomoc jest oczywi?cie zimny kufel i Respekt
Podpis
Pomagam jak potrafię
Ostatnio zmieniony przez AsterBonzo 2018-08-22, 10:48, w całości zmieniany 1 raz
Wysłany: 2018-08-22, 10:31
Kalizman
Wiek: 23 Na forum: 3651 dni Posty: 1394
Piwa : 4619
1. Podaj b??dy DB3.
2. Chodzi o marker rozpocz?cia s?u?by? Je?eli tak to pisze na czacie "rozpocz??e? s?u?b?" etc?
Wysłany: 2018-08-22, 10:35
AsterBonzo
Otwórz ogień
Wiek: 20 Na forum: 2968 dni Posty: 187
Nick w MP: Hirahi
Piwa : 60
Chodzi mi o skina w markerze na samym dole pokazuje mi sie marker ale skina nie moge wzi??? bo nie chce mie? pickupa na skina bo one s? zbugowane wi?c wole marker.
i nie trzeba pokazywa? b??d? db3 bo w 1 frakcji zrobi?em w SFPD i dzia?a?o normalnie tylko tu co? nei dzia?a
Podpis
Pomagam jak potrafię
Wysłany: 2018-08-22, 15:38
Emm
***** ***
Wiek: 32 Na forum: 3880 dni Posty: 3191
Nick w MP: Emm
Piwa : 6162
Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Zmie? sprawdzan? elementdate z SFPD na LSPD (na dole kodu)
Podpis
Użytkownik : 20.10.2015r
GTAO Member : 06.03.2016r
Support-Team : 20.01.2016r
Moderator : 30.03.2016r
Mod-Team : 08.10.2016r
Vice Admin : 04.05.2018r
Administrator : 03.05.2022r
[you]
! Koniecznie zapoznaj się z
regulaminem forum .
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również
regulaminy działów , w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez
Administrację , przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w
tym dziale .
Najważniejsze informacje od
Administracji możesz przeczytać
tutaj oraz
tutaj .
Tagi: znaowu :: powracamy :: tematu :: mojego :: pt. :: skiny :: dla :: policji
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: