Wysłany: 2016-11-26, 20:08
STOPseba
Emeryt na scenie MTA
Wiek: 25 Na forum: 3771 dni Posty: 448
Nick w MP: STOPseba
Piwa : 5014
Witam mam problem z przebieralni? chodzi o to ze chcia?em mie? dwie i skopiowa?em pliki przebieralni x2 co? takiego:
przebieralnia:
skinypremium ={ 167 , 168 , 57 , 26 , 271 , 270 , 120 , 238 , 237 , 233 , 11 , 264 , 40 , 45 , 75 , 87 , 83 , 63 }
-- 167 - 168 - 57 - 26 - 271 - 270 - 120 - 238 - 237 - 233 - 11 - 264 - 40 - 45 - 75 - 87 - 83 - 63 --
addEvent ( "onPlayerEditSkin" , true )
addEventHandler ( "onPlayerEditSkin" , root , function( model )
local model = tonumber ( model )
-- outputChatBox ( model )
for i , v in ipairs ( skinypremium ) do
if model == v then
if not getElementData ( client , "player:premium" ) then
outputChatBox ( "* Przykro nam ale Nie posiadasz Konta Premium" , client , 255 , 255 , 0 )
return
end
end
end
setElementModel ( client , model )
local uid = getElementData ( client , "player:uid" )
local query = exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_users SET skin=? WHERE id=?" , model , uid )
setElementData ( client , "player:skin" , model )
end )
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
wejscie = createMarker (- 1882.26 , 866.51 , 35.17 + 1 , "arrow" , 2 , 255 , 255 , 0 )
wyjscie2 = createMarker ( 227.56 ,- 8.10 , 1002.21 + 1 , "arrow" , 2 , 255 , 255 , 0 ) --
setElementInterior ( wyjscie2 , 5 )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 5 )
setElementPosition ( el , 224.59 ,- 8.30 , 1002.21 )
end )
addEventHandler ( "onMarkerHit" , wyjscie2 , function( el , md )
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 0 )
setElementPosition ( el , - 1884.07 , 864.18 , 35.17 )
end )
createBlip (- 1883.76 , 865.67 , 35.17 , 45 , 2 , 0 , 0 , 0 , 0 , 0 , 275 )
przebieralnia_c:
local missionText = createElement ( "text" )
setElementData ( missionText , "name" , "Wyb?r skina" )
setElementPosition ( missionText , 209.53 ,- 8.26 , 1005.21 )
setElementInterior ( missionText , 5 )
skinypremium ={ 167 , 168 , 57 , 26 , 271 , 270 , 120 , 238 , 237 , 233 , 11 , 264 , 40 , 45 , 75 , 87 , 83 , 63 }
local skiny = { 0 , 1 , 6 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 28 , 32 , 33 , 34 , 36 , 43 , 44 , 46 , 47 , 49 , 52 , 58 , 59 , 66 , 72 , 78 , 79 , 81 , 82 , 84 , 95 , 96 , 99 , 100 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 122 , 123 , 124 , 133 , 134 , 136 , 137 , 142 , 143 , 144 , 146 , 147 , 155 , 158 , 160 , 163 , 164 , 170 , 173 , 174 , 175 , 176 , 177 , 179 , 184 , 185 , 186 , 187 , 188 , 189 , 202 , 203 , 210 , 217 , 220 , 223 , 228 , 229 , 236 , 240 , 241 , 242 , 247 , 248 , 250 , 252 , 253 , 255 , 260 , 269 , 272 , 290 , 291 , 292 , 293 , 294 , 297 , 299 , 300 , 303 , 306 , 308 , 311 , 12 , 13 , 31 , 38 , 39 , 41 , 53 , 55 , 88 , 91 , 93 , 135 , 138 , 139 , 140 , 145 , 148 , 150 , 169 , 192 , 193 , 197 , 198 , 201 , 205 , 211 , 216 , 219 }
local ubrania = createMarker ( 209.53 ,- 8.26 , 1005.21 - 1 , "cylinder" , 2 , 225 , 255 , 50 , 50 )
setElementInterior ( ubrania , 5 )
setElementDimension ( ubrania , 0 )
okno = guiCreateWindow ( 897 , 179 , 262 , 381 , "Przebieralnia" , false )
gridlist = guiCreateGridList ( 9 , 27 , 243 , 344 , false , okno )
guiGridListAddColumn ( gridlist , "ID" , 0.9 )
guiWindowSetSizable ( okno , false )
guiSetVisible ( okno , false )
for e , f in ipairs ( skinypremium ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Premium (" .. f .. ")" ), false , false )
guiGridListSetItemColor ( gridlist , row , 1 , 255 , 255 , 0 )
end
for i , v in ipairs ( skiny ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Zwyk?y (" .. v .. ")" ), false , false )
end
addEventHandler ( "onClientGUIClick" , gridlist , function()
local text = guiGridListGetItemText ( gridlist , guiGridListGetSelectedItem ( gridlist ))
local model = tonumber ( string . match ( text , "(%d+)" ))
if model then
triggerServerEvent ( "onPlayerEditSkin" , getLocalPlayer (), model )
guiSetVisible ( okno , false )
showCursor ( false )
end
end )
addEventHandler ( "onClientMarkerHit" , ubrania , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el == localPlayer then
guiSetVisible ( okno , true )
showCursor ( true , false )
end
end )
addEventHandler ( "onClientMarkerLeave" , ubrania , function( el , md )
guiSetVisible ( okno , false )
showCursor ( false )
end )
I tak skopiowa?em i przerobi?em:
Sls:
skinypremium2 ={ 167 , 168 , 57 , 26 , 271 , 270 , 120 , 238 , 237 , 233 , 11 , 264 , 40 , 45 , 75 , 87 , 83 , 63 }
-- 167 - 168 - 57 - 26 - 271 - 270 - 120 - 238 - 237 - 233 - 11 - 264 - 40 - 45 - 75 - 87 - 83 - 63 --
addEvent ( "onPlayerEditSkin" , true )
addEventHandler ( "onPlayerEditSkin" , root , function( model2 )
local model2 = tonumber ( model2 )
-- outputChatBox ( model )
for i , v in ipairs ( skinypremium2 ) do
if model2 == v then
if not getElementData ( client2 , "player:premium" ) then
outputChatBox ( "* Przykro nam ale Nie posiadasz Konta Premium" , client2 , 255 , 255 , 0 )
return
end
end
end
setElementModel ( client2 , model2 )
local uid = getElementData ( client , "player:uid" )
local query = exports [ "ogrpg-db" ]: dbSet ( "UPDATE ogrpg_users SET skin=? WHERE id=?" , model2 , uid )
setElementData ( client2 , "player:skin" , model2 )
end )
-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------
wejscie = createMarker ( 1410.57 ,- 1700.93 , 13.54 + 1 , "arrow" , 2 , 255 , 255 , 0 )
wyjscie2 = createMarker ( 204.27 ,- 168.86 , 1000.52 + 1 , "arrow" , 2 , 255 , 255 , 0 ) --
setElementInterior ( wyjscie2 , 14 )
addEventHandler ( "onMarkerHit" , wejscie , function( el , md )
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 14 )
setElementPosition ( el , 204.07 ,- 165.71 , 1000.52 )
end )
addEventHandler ( "onMarkerHit" , wyjscie2 , function( el , md )
if isPedInVehicle ( el ) then return end
setElementInterior ( el , 0 )
setElementPosition ( el , 1413.43 ,- 1703.10 , 13.54 )
end )
createBlip (- 1413.43 ,- 1703.10 , 13.54 , 45 )
Cls:
local missionText = createElement ( "text" )
setElementData ( missionText , "name" , "Wyb?r skina" )
setElementPosition ( missionText , 204.50 ,- 159.81 , 1000.52 )
setElementInterior ( missionText , 14 )
skinypremium2 ={ 167 , 168 , 57 , 26 , 271 , 270 , 120 , 238 , 237 , 233 , 11 , 264 , 40 , 45 , 75 , 87 , 83 , 63 }
local skiny2 = { 0 , 1 , 6 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 28 , 32 , 33 , 34 , 36 , 43 , 44 , 46 , 47 , 49 , 52 , 58 , 59 , 66 , 72 , 78 , 79 , 81 , 82 , 84 , 95 , 96 , 99 , 100 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 122 , 123 , 124 , 133 , 134 , 136 , 137 , 142 , 143 , 144 , 146 , 147 , 155 , 158 , 160 , 163 , 164 , 170 , 173 , 174 , 175 , 176 , 177 , 179 , 184 , 185 , 186 , 187 , 188 , 189 , 202 , 203 , 210 , 217 , 220 , 223 , 228 , 229 , 236 , 240 , 241 , 242 , 247 , 248 , 250 , 252 , 253 , 255 , 260 , 269 , 272 , 290 , 291 , 292 , 293 , 294 , 297 , 299 , 300 , 303 , 306 , 308 , 311 , 12 , 13 , 31 , 38 , 39 , 41 , 53 , 55 , 88 , 91 , 93 , 135 , 138 , 139 , 140 , 145 , 148 , 150 , 169 , 192 , 193 , 197 , 198 , 201 , 205 , 211 , 216 , 219 }
local ubrania2 = createMarker ( 204.50 ,- 159.81 , 1000.52 - 1 , "cylinder" , 2 , 225 , 255 , 50 , 50 )
setElementInterior ( ubrania2 , 14 )
setElementDimension ( ubrania2 , 0 )
okno = guiCreateWindow ( 897 , 179 , 262 , 381 , "Przebieralnia" , false )
gridlist = guiCreateGridList ( 9 , 27 , 243 , 344 , false , okno )
guiGridListAddColumn ( gridlist , "ID" , 0.9 )
guiWindowSetSizable ( okno , false )
guiSetVisible ( okno , false )
for e , f in ipairs ( skinypremium2 ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Premium (" .. f .. ")" ), false , false )
guiGridListSetItemColor ( gridlist , row , 1 , 255 , 255 , 0 )
end
for i , v in ipairs ( skiny2 ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Zwyk?y (" .. v .. ")" ), false , false )
end
addEventHandler ( "onClientGUIClick" , gridlist , function()
local text = guiGridListGetItemText ( gridlist , guiGridListGetSelectedItem ( gridlist ))
local model = tonumber ( string . match ( text , "(%d+)" ))
if model then
triggerServerEvent ( "onPlayerEditSkin" , getLocalPlayer (), model )
guiSetVisible ( okno , false )
showCursor ( false )
end
end )
addEventHandler ( "onClientMarkerHit" , ubrania2 , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el == localPlayer then
guiSetVisible ( okno , true )
showCursor ( true , false )
end
end )
addEventHandler ( "onClientMarkerLeave" , ubrania2 , function( el , md )
guiSetVisible ( okno , false )
showCursor ( false )
end )
i niby dzia?a ale mam info dwa razy ze nie mam premium mo?e kto? mi z tym pom?c?
za pomoc
Wysłany: 2016-11-26, 20:20
Pumelowsky
Amator 3D
Wiek: 23 Na forum: 4182 dni Posty: 199
Nick w MP: Pumelowsky
Piwa : 1666
Zr?b po prostu drugi marker.
Podpis
Kontakt:
- Skype: live:pumapl_2
- GG: 56865468
- Discord: Pumelowsky#1126
- PW forum
[/center]
Wysłany: 2016-11-26, 20:30
STOPseba
Emeryt na scenie MTA
Wiek: 25 Na forum: 3771 dni Posty: 448
Nick w MP: STOPseba
Piwa : 5014
"PumaPL123" napisał/a :Zr?b po prostu drugi marker.
zrobi?em drugi markker i dzia?a tylko w ls
local missionText = createElement ( "text" )
setElementData ( missionText , "name" , "Wyb?r skina" )
setElementPosition ( missionText , 209.53 ,- 8.26 , 1005.21 )
setElementInterior ( missionText , 5 )
skinypremium ={ 167 , 168 , 57 , 26 , 271 , 270 , 120 , 238 , 237 , 233 , 11 , 264 , 40 , 45 , 75 , 87 , 83 , 63 }
local skiny = { 0 , 1 , 6 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 28 , 32 , 33 , 34 , 36 , 43 , 44 , 46 , 47 , 49 , 52 , 58 , 59 , 66 , 72 , 78 , 79 , 81 , 82 , 84 , 95 , 96 , 99 , 100 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 122 , 123 , 124 , 133 , 134 , 136 , 137 , 142 , 143 , 144 , 146 , 147 , 155 , 158 , 160 , 163 , 164 , 170 , 173 , 174 , 175 , 176 , 177 , 179 , 184 , 185 , 186 , 187 , 188 , 189 , 202 , 203 , 210 , 217 , 220 , 223 , 228 , 229 , 236 , 240 , 241 , 242 , 247 , 248 , 250 , 252 , 253 , 255 , 260 , 269 , 272 , 290 , 291 , 292 , 293 , 294 , 297 , 299 , 300 , 303 , 306 , 308 , 311 , 12 , 13 , 31 , 38 , 39 , 41 , 53 , 55 , 88 , 91 , 93 , 135 , 138 , 139 , 140 , 145 , 148 , 150 , 169 , 192 , 193 , 197 , 198 , 201 , 205 , 211 , 216 , 219 }
local ubrania = createMarker ( 209.53 ,- 8.26 , 1005.21 - 1 , "cylinder" , 2 , 225 , 255 , 50 , 50 )
setElementInterior ( ubrania , 5 )
setElementDimension ( ubrania , 0 )
local ubrania = createMarker ( 204.50 ,- 159.81 , 1000.52 - 1 , "cylinder" , 2 , 225 , 255 , 50 , 50 )
setElementInterior ( ubrania , 14 )
setElementDimension ( ubrania , 0 )
okno = guiCreateWindow ( 897 , 179 , 262 , 381 , "Przebieralnia" , false )
gridlist = guiCreateGridList ( 9 , 27 , 243 , 344 , false , okno )
guiGridListAddColumn ( gridlist , "ID" , 0.9 )
guiWindowSetSizable ( okno , false )
guiSetVisible ( okno , false )
for e , f in ipairs ( skinypremium ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Premium (" .. f .. ")" ), false , false )
guiGridListSetItemColor ( gridlist , row , 1 , 255 , 255 , 0 )
end
for i , v in ipairs ( skiny ) do
local row = guiGridListAddRow ( gridlist )
guiGridListSetItemText ( gridlist , row , 1 , string . format ( "Skin Zwyk?y (" .. v .. ")" ), false , false )
end
addEventHandler ( "onClientGUIClick" , gridlist , function()
local text = guiGridListGetItemText ( gridlist , guiGridListGetSelectedItem ( gridlist ))
local model = tonumber ( string . match ( text , "(%d+)" ))
if model then
triggerServerEvent ( "onPlayerEditSkin" , getLocalPlayer (), model )
guiSetVisible ( okno , false )
showCursor ( false )
end
end )
addEventHandler ( "onClientMarkerHit" , ubrania , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el == localPlayer then
guiSetVisible ( okno , true )
showCursor ( true , false )
end
end )
addEventHandler ( "onClientMarkerLeave" , ubrania , function( el , md )
guiSetVisible ( okno , false )
showCursor ( false )
end )
[ Dodano : 2016-11-26, 20:32 ]
@Lock
Poradzi?em sobie sam...
Wysłany: 2016-11-26, 20:32
amited
Wiek: 26 Na forum: 3714 dni Posty: 1233
Nick w MP: Amited
Piwa : 512
STOPseba , Dlaczego da?e? 2 takie same nazwy markerom ?
Podpis
"amited" napisał/a :
Tagi: przebieralnia
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: