Prosi?bym o przerobienie skryptu, chodzi mi o to, ?e w tym skrypcie s? boty, kt?re po zrespieniu atakuj? graczy, a ja potrzebowa?bym ?eby tylko si? porusza?y bez atakowania:
http://www85.zippyshare.com/v/FyYsha4K/file.html
Witam mam problem z jednym skryptem z salonem bo jak kupuje si? pojazd to powin? si? respawnowa? jeszcze raz a si? nie respawni i nie wiem co z tym jest nie tak pomo?e kto??
Ostatnio zmieniony przez FrosteR 2017-03-24, 17:27, w całości zmieniany 1 raz
addEventHandler ( "onVehicleExplode", getRootElement(),
function()
if(p_lights[source] == 1) then
killTimer(p_timer[source])
end
end )
addEventHandler ( "onVehicleRespawn", getRootElement(),
function()
if(p_lights[source] == 1) then
killTimer(p_timer[source])
end
end )
addEventHandler("onElementDestroy", getRootElement(),
function ()
if getElementType(source) == "vehicle" then
if(p_lights[source] == 1) then
killTimer(p_timer[source])
end
end
end)
Chcia?bym aby swiatelka uruchamialy sie pod dany klawisz *bind* lecz nie dziala mi cos co ja tu robie zle ?
Witam, czy kto? by da? rade przerobic system samochodowd z pojemnascia silnika i rodzajami paliwa (lpg, benzyna, disel) z gamemode OwnWorld pod gamemode ogrpg
Powie ktos czy dobrze czy zle czy by mi ktos to zrobi? bo nie wiem czy dobrze za to to jest ten SMSAPI ServerProject
-- Variables
local premium = {
['api_key'] = '9e47224a4032b9779ba19c182',
}
-- Functions
function result(responseData, errno, playerToReceive)
if string.find(responseData, '"error":"bad_code"') then
outputChatBox('* Wprowadzony kod jest nieprawid?owy lub zosta? wykorzystany.', playerToReceive)
return
end
if string.find(responseData, '"status":"fail"') then
outputChatBox('* Wyst?pi? nieznany b??d podczas zakupu us?ugi.', playerToReceive)
return
end
--
-- Zabezpieczenie kt?re zabrania graczowi zakupu us?ugi na 30 dni z otrzymanym kodem us?ugi na 3 dni.
-- Gdy kwoty po stronie Clienta ulegn? zmianie, nale?y je uzupe?ni? tak?e tutaj.
--
local days = nil
if string.find(responseData, '"amount":"1"') then days = 1 end
if string.find(responseData, '"amount":"2"') then days = 7 end
if string.find(responseData, '"amount":"3"') then days = 30 end
if string.find(responseData, '"amount":"4"') then days = 45 end
if string.find(responseData, '"amount":"5"') then days = 55 end
if not days then return end
--
-- Koniec zabezpieczenia
--
--
-- Od tego momentu mo?na ustawi? co ma si? wykonywa? po prawid?owym wprowadzeniu kodu.
-- Je?eli chcemy pobra? ilo?? dni zakupionej us?ugi nale?y wprowadzi? w danym miejscu 'days'.
-- Przyk?ad u?ycia znajduje si? poni?ej.
--
outputChatBox('* Kod prawid?owy, zakupi?e?/a? na '.. days ..' dni us?ug? Premium.', playerToReceive)
end
addEvent('premium:checkCode', true)
addEventHandler('premium:checkCode', resourceRoot, function(code, netto)
if not code then return end
-- Functions
addEventHandler('onClientGUIClick', resourceRoot, function(button)
if not guiGetVisible(gui.window) or button ~= 'left' then return end
if source == gui.button_buy then
local selectedRow = guiGridListGetSelectedItem(gui.gridlist)
if selectedRow < 0 then return end
local service = guiGridListGetItemText(gui.gridlist, selectedRow, 1)
local number = guiGridListGetItemText(gui.gridlist, selectedRow, 2)
local content = guiGridListGetItemText(gui.gridlist, selectedRow, 3)
local cost = guiGridListGetItemData(gui.gridlist, selectedRow, 4)
if service and number and content and cost then
local radio = guiRadioButtonGetSelected(gui.radio)
if not radio then
outputChatBox('* Nie zaakceptowa?e?/a? regulamin us?ugi.')
return
end
local code = guiGetText(gui.edit)
if not code or string.len(code) ~= 6 then
outputChatBox('* Tw?j kod musi zawiera? 6 znak?w.')
return
end
triggerServerEvent('premium:checkCode', resourceRoot, code, cost)
end
end
if source == gui.button_cancel then
showCursor(false)
guiSetVisible(gui.window, false)
end
end)
bindKey('F2', 'down', function()
if not guiGetVisible(gui.window) then
showCursor(true)
guiSetVisible(gui.window, true)
guiGridListClear(gui.gridlist)
for k,v in pairs(options) do
local row = guiGridListAddRow(gui.gridlist)
guiGridListSetItemText(gui.gridlist, row, 1, v['service'], false, false)
guiGridListSetItemText(gui.gridlist, row, 2, v['number'], false, false)
guiGridListSetItemText(gui.gridlist, row, 3, v['content'], false, false)
guiGridListSetItemText(gui.gridlist, row, 4, v['cost'] .. ' PLN', false, false)
guiGridListSetItemData(gui.gridlist, row, 4, v['cost_netto'])
end
end
end)
gg55, wbij na ts3 do szerokiego i tam mozesz mnie spotkac jutro pod wiecz?r moge ci z tym pom?c gdyz bede ko?czy? gm ourFarm.
B?d? napisz do mnie na pw forum to sie dogadamy co do kontaktu .
Podpis
Młody twórca o wielkim sercu.
Zajmuję się:
Programistyka
Grafika
Map Editor
Teksturowanie obiektów.
function PanelWyplataInfo()
local czaspraca = getElementData(localPlayer,"user:workmoney") or 0
dxDrawBorderedText("Wyp?atomat Frakcyjny!\n\nTutaj wyp?acisz swoje pieni?dz? za wykonan? s?u?b?\nw SAPD/SAMC/SAFD.\n\nCzas na s?u?bi?: #00DD00"..czaspraca.." minut.", screenW * 0.329, screenH * 0.341, screenW * 0.670, screenH * 0.586, tocolor(255, 255, 255, 255), 1.00, foNte2, "center", "center", false, false, false, false, false)
end
function uruchom(el,md)
if el~=localPlayer then return end
if panelWyplaty == false then
addEventHandler("onClientRender",root,PanelWyplata)
wyplata = createElement("dxButton")
zamknij = createElement("dxButton")
start = getTickCount()
panelWyplaty = true
showCursor(true)
setTimer(function ()
addEventHandler("onClientRender",root,PanelWyplataInfo)
end,1500,1)
end
end
addEventHandler('onClientMarkerHit',marker,uruchom)
function Zamknijokno(clickedButton)
if panelWyplaty == true then
if clickedButton then
if clickedButton == zamknij then
removeEventHandler("onClientRender",root,PanelWyplata)
removeEventHandler("onClientRender",root,PanelWyplataInfo)
destroyElement(zamknij)
destroyElement(wyplata)
showCursor(false)
panelWyplaty = false
end
end
end
end
addEvent("onDxLibButtonClick",true)
addEventHandler("onDxLibButtonClick",getRootElement(),Zamknijokno)
function WyplacGracza(clickedButton)
if panelWyplaty == true then
if clickedButton then
if clickedButton == wyplata then
triggerServerEvent("wyplata", root,localPlayer)
end
end
end
end
addEvent("onDxLibButtonClick",true)
addEventHandler("onDxLibButtonClick",getRootElement(),WyplacGracza)
function dxDrawAnimWindow(text,width,height,color,color2,colorText,font,anim)
local x,y = guiGetScreenSize()
btwidth = width
btheight = height/20
local now = getTickCount()
local elapsedTime = now - start
local endTime = start + 1500
local duration = endTime - start
local progress = elapsedTime / duration
local x1, y1, z1 = interpolateBetween ( 0, 0, 0, width, height, 255, progress, anim)
local x2, y2, z2 = interpolateBetween ( 0, 0, 0, btwidth, btheight+10, btheight/22, progress, anim)
function roundedRectangle(x, y, w, h, borderColor, bgColor, postGUI)
if (x and y and w and h) then
if (not borderColor) then
borderColor = tocolor(0, 0, 0, 200);
end
if (not bgColor) then
bgColor = borderColor;
end
--> Background
dxDrawRectangle(x, y, w, h, bgColor, postGUI);
--> Border
dxDrawRectangle(x + 2, y - 1, w - 4, 1, borderColor, postGUI); -- top
dxDrawRectangle(x + 2, y + h, w - 4, 1, borderColor, postGUI); -- bottom
dxDrawRectangle(x - 1, y + 2, 1, h - 4, borderColor, postGUI); -- left
dxDrawRectangle(x + w, y + 2, 1, h - 4, borderColor, postGUI); -- right
end
end
function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text:gsub('#%x%x%x%x%x%x', ''), x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 255 ), scale, font, alignX, alignY, clip, wordBreak, false )
dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI, true )
end
Witam prosi? bym tez jeszcze o przerobienie tego skryptu duty admin zeby po wpisaniu komendy /zpj nick czas jednostka powod nie mozna bylo wsiadac do pojazdu jak narazie mozna dodalem wszysto do acl ale i tak nie dzia?a
Witam, znalaz?em dzisiaj na internecie skrypt na prywatne wiadomo?ci, kt?re mo?na wysy?a? za pomoc? komendy "/pm <nick<". Chcia?bym, aby kto? mi pom?g? przerobi?/dorobi? wstawk?, ?e mo?na te? wpisa? id i wy?le do gracza z podanym id. Mam skrypt "systemid" ze strony mta:sa, wi?c problemu chyba nie b?dzie.
LUA skryptu:
function privateMessage(thePlayer,commandName,sendToName,...)
local pmWords = { ... }
local pmMessage = table.concat( pmWords, " " )
if sendToName then
if (getPlayerFromParticalName (sendToName)) then
toPlayer = (getPlayerFromParticalName (sendToName))
if not (toPlayer == thePlayer) then
if not (pmMessage == "") then
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF wiadomosc #FFFFFF" .. getPlayerName(toPlayer) .. "#FFFFFF: " .. pmMessage, thePlayer, 255, 255, 255, true)
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF wiadomosc od #FFFFFF" .. getPlayerName(thePlayer) .. "#FFFFFF: " .. pmMessage, toPlayer, 255, 255, 255, true)
else
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF Nieprawidlowa skladnia! Usage:#FFFFFF /pm [partical player name] [message]", thePlayer, 255, 255, 255, true)
return false
end
else
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF Nie mozesz wysylac wiadomosci do siebie#FFFFFF!", thePlayer, 255, 255, 255, true)
return false
end
else
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF Nie znaleziono gracza #FFFF00(#FFFFFF"..sendToName.."#FFFF00)", thePlayer, 255, 255, 255, true)
return false
end
else
outputChatBox("#FFFF00[Wiadomosc]#FFFFFF Nieprawidlowa skladnia! Usage:#FFFFFF /pm [partical player name] [message]", thePlayer, 255, 255, 255, true)
return false
end
end
addCommandHandler("pm", privateMessage)
function getPlayerFromParticalName(thePlayerName)
local thePlayer = getPlayerFromName(thePlayerName)
if thePlayer then
return thePlayer
end
for _,thePlayer in ipairs(getElementsByType("player")) do
if string.find(string.gsub(getPlayerName(thePlayer):lower(),"#%x%x%x%x%x%x", ""), thePlayerName:lower(), 1, true) then
return thePlayer
end
end
return false
end
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