Wysłany: 2015-08-26, 14:28
BlackTen
LUA Dev.
Wiek: 28 Na forum: 4330 dni Posty: 698
Piwa : 2080
cos mi tu nie pyka bo hajsu nie dostaje
local praca = createMarker ( 2524.33 ,- 1298.10 , 1030.70 , "cylinder" , 2.0 , 255 , 96 , 0 , 100 )
-- local pracaablip = createBlip ( 2472.45361 , - 1522.77454 , 24.23447 , 52 )
local blip = createBlip ( 2193.31 , 2789.94 , 10.82 , 52 , 2 )
setElementInterior ( praca , 2 )
local miejscaelektryk = {
{ 2543.44 ,- 1301.67 , 1031.42 },
{ 2544.71 ,- 1293.26 , 1031.42 },
{ 2534.21 ,- 1290.72 , 1031.42 },
{ 2563.46 ,- 1291.90 , 1031.42 },
}
addEventHandler ( "onClientMarkerHit" , praca , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
outputChatBox ( "* Praca by BlackTen" )
outputChatBox ( "* Aby rozpocz?? prac? wci?nij 'M'" )
end )
bindKey ( "m" , "down" , function()
if not isElementWithinMarker ( localPlayer , praca ) then return end
if not getElementData ( localPlayer , "gracz_praca" ) then
local losuj = math . random ( 2 , #miejscaelektryk)
setElementData ( localPlayer , "gracz_praca" , true )
setPedAnimation ( localPlayer , "CARRY" , "crry_prtial" , 1 , true )
local skrzynia = createObject ( 1271 , 0 , 0 , 0 )
setElementInterior ( skrzynia , 2 )
attachElements ( skrzynia , localPlayer , 0 , 0.8 , 0.5 )
local cel = createMarker ( miejscaelektryk [ losuj ][ 1 ], miejscaelektryk [ losuj ][ 2 ], miejscaelektryk [ losuj ][ 3 ]- 1.0 , "checkpoint" , 1.0 , 255 , 0 , 0 )
local blip = createBlipAttachedTo ( cel , 41 )
addEventHandler ( "onClientMarkerHit" , cel , function( el , md )
if not md or getElementType ( el ) ~= "player" then return end
if el ~= localPlayer then return end
if getPedOccupiedVehicle ( el ) then
outputChatBox ( "* Nie mo?esz tego od?o?y? b?d?c w poje?dzie!" )
return
end
destroyElement ( blip )
setElementFrozen ( el , true )
outputChatBox ( "* K?adziesz Skrzyni? Poczekaj (5 sekund)" )
setTimer (function()
setElementFrozen ( el , false )
outputChatBox ( "* Po?o?y?e? Skrzynie." )
destroyElement ( skrzynia )
destroyElement ( cel )
setPedAnimation ( localPlayer , false )
setElementData ( el , "gracz_praca" , false )
triggerServerEvent ( "giveGPoint" , root )
triggerServerEvent ( "givePlayerMoney" , el , 10 , 1 )
end , 4500 , 1 )
end )
else
outputChatBox ( "* Posiadasz aktywn? prac?." )
end
end )
-- Teleport !
Wysłany: 2015-08-26, 15:02
Fanciak
BOT
Wiek: 25 Na forum: 4446 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
Zrob nowy folder o dowolnej nazwie, zrob mete i plik po stronie servera, po czym wypelnij go tym kodem:
addEvent ( "takePlayerMoney" , true )
addEventHandler ( "takePlayerMoney" , root , function( money )
if not tonumber ( money ) then return end
takePlayerMoney ( source , tonumber ( money ))
end )
addEvent ( "givePlayerMoney" , true )
addEventHandler ( "givePlayerMoney" , root , function( money , gp )
if not tonumber ( money ) or not tonumber ( gp ) then return end
local sctera = getElementData ( source , "GP" ) or 0
givePlayerMoney ( source , money )
setElementData ( source , "GP" , tonumber ( sctera ) + tonumber ( gp ))
exports . notification : showBox ( source , "info" , "* Na twoje konto zostalo dodane: (+ " .. money .. " z?‚ i " .. gp .. " GP)" )
end )
Tagi: praca
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: