Wysłany: 2015-08-03, 15:36
vicuuus
Wiek: 25 Na forum: 4006 dni Posty: 63
Piwa : 11
Wysłany: 2015-08-04, 13:41
Vxen
Wiek: 27 Na forum: 4087 dni Posty: 293
Piwa : 1299
A mog? przerobi? inny panel podobny do tego logowania... Chcesz?
Wysłany: 2015-08-06, 14:52
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4150 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Wysłany: 2015-08-06, 15:30
Kamilos50
Wiek: 24 Na forum: 4574 dni Posty: 3
Nick w MP: Kamilos
Witam prosz? o przerobienie mojego kodu nie wiem jak to zrobi?.
To jest oto kod na ID-system ale nadaje ID-1 ka?demu a 2,3...itd nie chce da?.
Postanowi?em skr?ci? jak si? da.
Za pomoc daje piwko i respekt.
addEventHandler ( 'onClientResourceStart', resourceRoot,
function ( )
for i,v in ipairs ( getElementsByType ( 'player' ) ) do
setElementData ( v, 'data.playerID', i )
end
exports.scoreboard:scoreboardAddColumn ( 'data.playerID', 80, 'ID' )
end
)
Wysłany: 2015-08-06, 16:16
vicuuus
Wiek: 25 Na forum: 4006 dni Posty: 63
Piwa : 11
Vxen je?eli by? m?g? to tak
Wysłany: 2015-08-06, 17:03
Fanciak
BOT
Wiek: 25 Na forum: 4447 dni Posty: 728
Nick w MP: Fanciak
Piwa : 1572
Kamilos50 , po tym kodzie nic nie zdzialamy. Daj wiecej.
Wysłany: 2015-08-08, 14:43
Toporek
Wiek: 41 Na forum: 3977 dni Posty: 37
Nick w MP: spejson
Piwa : 1
Witam,mog?bym prosi? o przeobienie skryptu na kontener/armabox na mod dayz?
Chce,zeby kontener by? oznaczony na mapie +,znika? po np.10min i zeby by?o napisane na globalu/na srodku dla kazdego,ze armybox zosta? zrespiony.Thx
Link do skryptu z community:
http://community.multithe...etails&id=11857
Wysłany: 2015-08-08, 15:37
luki123luki123
Place Game
Wiek: 28 Na forum: 5275 dni Posty: 1948
Nick w MP: LuKiO
Piwa : 6101
function tentdayz ( thePlayer )
accountname = getAccountName ( getPlayerAccount ( thePlayer ))
if not isObjectInACLGroup ( "user." .. accountname , aclGetGroup ( "Admin" )) then
return outputChatBox ( "Nie jeste? Administatorem" , thePlayer ) end
local x , y , z = getElementPosition ( thePlayer )
tent = createObject ( 3243 , x , y + 4 , z - 1 )
if not tent then return end
setObjectScale ( tent , 0.5 )
tentCol = createColSphere ( x , y , z , 4 )
Blip = createBlip ( x , y + 4 , z - 1 , 41 )
setTimer ( function()
destroyElement ( tent )
destroyElement ( tentCol )
destroyElement ( Blip )
end , 1000 * 60 * 10 , 1 )
setElementData ( tentCol , "parent" , tent )
setElementData ( tent , "parent" , tentCol )
setElementData ( tentCol , "tent" , true )
setElementData ( tentCol , "vehicle" , true )
setElementData ( tentCol , "MAX_Slots" , 40000 )
setElementData ( tentCol , "M4" , 999 )
setElementData ( tentCol , "M4 Mag" , 999 )
setElementData ( tentCol , "PDW" , 999 )
setElementData ( tentCol , "Mp5" , 999 )
setElementData ( tentCol , "Mp5 Mag" , 999 )
setElementData ( tentCol , "Winchester 1866" , 999 )
setElementData ( tentCol , "1866 slug" , 999 )
setElementData ( tentCol , "Tent" , 999 )
setElementData ( tentCol , "Hatchat" , 999 )
setElementData ( tentCol , "Hunting Knife" , 999 )
setElementData ( tentCol , "Wirefence" , 999 )
setElementData ( tentCol , "Lee Enfield" , 999 )
setElementData ( tentCol , "Lee Enfield Mag" , 999 )
setElementData ( tentCol , "CZ 550" , 999 )
setElementData ( tentCol , "CZ 550 Mag" , 999 )
setElementData ( tentCol , "AK-47" , 999 )
setElementData ( tentCol , "AK Mag" , 999 )
setElementData ( tentCol , "Pizza" , 999 )
setElementData ( tentCol , "Milk" , 999 )
setElementData ( tentCol , "Coyote Backpack" , 999 )
setElementData ( tentCol , "Cooked Meat" , 999 )
setElementData ( tentCol , "Soda Bottle" , 999 )
setElementData ( tentCol , "Medic Kit" , 999 )
setElementData ( tentCol , "Morphine" , 999 )
setElementData ( tentCol , "Full Gas Canister" , 999 )
setElementData ( tentCol , "Engine" , 999 )
setElementData ( tentCol , "Tire" , 999 )
setElementData ( tentCol , "Tank Parts" , 999 )
setElementData ( tentCol , "Ghillie Suit" , 999 )
setElementData ( tentCol , "Map" , 999 )
setElementData ( tentCol , "GPS" , 999 )
setElementData ( tentCol , "Toolbox" , 999 )
setElementData ( tentCol , "Watch" , 999 )
setElementData ( tentCol , "M9 SD" , 999 )
setElementData ( tentCol , "M9 SD Mag" , 999 )
setElementData ( tentCol , "Grenade" , 999 )
setElementData ( tentCol , "O.S Pack" , 999 )
setElementData ( tentCol , "Camouflage Clothing" , 999 )
setElementData ( tentCol , "Civilian Clothing" , 999 )
end
addCommandHandler ( "armabox" , tentdayz )
Wysłany: 2015-08-08, 16:00
Toporek
Wiek: 41 Na forum: 3977 dni Posty: 37
Nick w MP: spejson
Piwa : 1
u,wielkie thx,dodasz jeszcze funkcje,zeby nie da?o sie go usunac?
Wysłany: 2015-08-09, 12:25
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4150 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
Witajcie,mam pro?b?
Czy m?g?by mi kto? przerobi? ten kod tak aby wszyscy widzieli ten film kt?ry w??czy admin a nie ?e ka?dy widzi sw?j a drugi gracz nie widzi
local cWindow = guiCreateWindow ( 337 , 177 , 816 , 762 , "CINEMA" , false )
local browser = guiCreateBrowser ( 0 , 0 , 800 , 600 , false , false , false , cWindow )
local theBrowser = guiGetBrowser ( browser )
addEventHandler ( "onClientBrowserCreated" , theBrowser ,
function()
loadBrowserURL ( source , "http://www.youtube.com" )
end
)
CINEMA = {
button = {},
window = {},
edit = {}
}
addEventHandler ( "onClientResourceStart" , resourceRoot ,
function()
guiWindowSetSizable ( cWindow , false )
guiSetProperty ( cWindow , "CaptionColour" , "FF0309FB" )
guiSetVisible ( cWindow , false )
CINEMA . button [ 1 ] = guiCreateButton ( 9 , 608 , 388 , 35 , "GET URL" , false , cWindow )
guiSetFont ( CINEMA . button [ 1 ], "default-bold-small" )
guiSetProperty ( CINEMA . button [ 1 ], "NormalTextColour" , "FFFF0000" )
CINEMA . button [ 2 ] = guiCreateButton ( 427 , 608 , 381 , 35 , "PUT VIDEO IN CINEMA" , false , cWindow )
guiSetFont ( CINEMA . button [ 2 ], "default-bold-small" )
guiSetProperty ( CINEMA . button [ 2 ], "NormalTextColour" , "FFFF0000" )
CINEMA . button [ 3 ] = guiCreateButton ( 10 , 653 , 388 , 35 , "CLOSE" , false , cWindow )
guiSetFont ( CINEMA . button [ 3 ], "default-bold-small" )
guiSetProperty ( CINEMA . button [ 3 ], "NormalTextColour" , "FFFF0000" )
CINEMA . button [ 4 ] = guiCreateButton ( 425 , 654 , 383 , 34 , "VIEW VIDEO IN FULL SCREEN MODE" , false , cWindow )
guiSetFont ( CINEMA . button [ 4 ], "default-bold-small" )
guiSetProperty ( CINEMA . button [ 4 ], "NormalTextColour" , "FFFF0000" )
CINEMA . edit [ 1 ] = guiCreateEdit ( 11 , 700 , 796 , 52 , "" , false , cWindow )
guiEditSetReadOnly ( CINEMA . edit [ 1 ], true )
end
)
function geturl ()
if source == CINEMA . button [ 1 ] then
guiSetText ( CINEMA . edit [ 1 ], getBrowserURL ( theBrowser ))
end
end
addEventHandler ( "onClientGUIClick" , root , geturl )
function dxDrawImage3D ( x , y , z , w , h , m , c , r ,...)
local lx , ly , lz = x + w , y + h , ( z + tonumber ( r or 0 )) or z
return dxDrawMaterialLine3D ( x , y , z , lx , ly , lz , m , h , c , ...)
end
local screenWidth , screenHeight = guiGetScreenSize ()
local webBrowser = createBrowser ( screenWidth , screenHeight , false , false )
function webBrowserRender ()
local x , y = 110.7 , 1024.15
dxDrawMaterialLine3D ( x , y , 23.25 , x , y , 14.75 , webBrowser , 18.2 , tocolor ( 255 , 255 , 255 , 255 ), x , y + 1 , 19 )
end
function fullscreen ()
local URLs = string . sub ( guiGetText ( CINEMA . edit [ 1 ]), "33" )
if source == CINEMA . button [ 4 ] then
loadBrowserURL ( webBrowser , "https://www.youtube.com/embed/" .. URLs .. "?autoplay=1&iv_load_policy=3&enablejsapi=1&fs=0&theme=light" )
end
end
addEventHandler ( "onClientGUIClick" , root , fullscreen )
function brow ()
if source == CINEMA . button [ 2 ] then
loadBrowserURL ( webBrowser , guiGetText ( CINEMA . edit [ 1 ]))
addEventHandler ( "onClientPreRender" , root , webBrowserRender )
end
end
addEventHandler ( "onClientBrowserCreated" , webBrowser , brow )
addEventHandler ( "onClientGUIClick" , root , brow )
function url ()
guiSetVisible ( cWindow , true )
showCursor ( true )
guiSetInputEnabled ( true )
end
addCommandHandler ( "cinema" , url )
function closeman ()
if source == CINEMA . button [ 3 ] then
guiSetVisible ( cWindow , false )
showCursor ( false )
guiSetInputEnabled ( false )
end
end
addEventHandler ( "onClientGUIClick" , root , closeman )
Wysłany: 2015-08-09, 21:14
DaxRel69
Wiek: 30 Na forum: 4108 dni Posty: 171
Nick w MP: DaxRel
Piwa : 4368
Przerobi mi kto? ten kod by tylko na Globalu mogli pisa? RCON,Administrator,Moderator?
Kod: function RGBToHex(red, green, blue, alpha)
if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then
return nil
end
if(alpha) then
return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha)
else
return string.format("#%.2X%.2X%.2X", red,green,blue)
end
end
function onChat(message,messagetype)
if isGuestAccount(getPlayerAccount(source)) then
outputChatBox("Najpierw wejd? do gry.", source, 255, 000, 000)
return end
if messagetype == 0 then
cancelEvent()
local x, y, z = getElementPosition(source)
local chatCol = createColSphere(x,y,z,20)
local chatRadius = getElementsWithinColShape(chatCol)
local r, g, b = getPlayerNametagColor(source)
for key, value in ipairs(chatRadius) do
outputChatBox(getPlayerName(source).."#FFFFFF: "..message,value,r,g,b,true)
end
outputServerLog("LOCAL "..getPlayerName(source)..": "..message)
-- if not isPedInVehicle(source) then
--local talktime = string.len(message)*200
-- setPedAnimation(source,"ped","IDLE_chat",0,true,false,true,true)
--setTimer(function () setPedAnimation(source,nil, nil, nil)end,talktime,1)
--end
elseif messagetype == 1 then
cancelEvent()
local x, y, z = getElementPosition(source)
local chatCol = createColSphere(x,y,z,30)
local chatRadius = getElementsWithinColShape(chatCol)
for key, value in ipairs(chatRadius) do
outputChatBox("#FF5555*"..getPlayerName(source).." "..message,value,0,0,0,true)
outputServerLog("ME *"..getPlayerName(source).." "..message)
end
end
end
addEventHandler("onPlayerChat",getRootElement(),onChat)
function global(psource,command,...)
if isGuestAccount(getPlayerAccount(psource)) then
outputChatBox("Najpierw wejd? do gry.", psource, 255, 000, 000)
return end
local tekst = table.concat({...}," ")
r,g,b = getPlayerNametagColor(psource)
outputChatBox("#FF0000[Global] "..RGBToHex(r,g,b)..getPlayerName(psource).."#FFFFFF: "..tekst,getRootElement(),r,g,b,true)
outputServerLog("GLOBAL "..getPlayerName(psource)..": "..tekst)
end
addCommandHandler("global",global)
addEventHandler("onPlayerLogin",getRootElement(),function ()
bindKey(source,"u","down","chatbox","global")
end)
addEventHandler("onResourceStart", root,
function ( )
for k,v in ipairs(getElementsByType("player", root)) do
unbindKey(v, "u", "down", "chatbox", "global")
bindKey(v, "u","down","chatbox","global")
end
end)
Wysłany: 2015-08-11, 21:52
marcin778
Krytyk serwerów MTA
Wiek: 24 Na forum: 4150 dni Posty: 2268
Nick w MP: Marcineg
Piwa : 4662
[spoiler]
Witam!
czy kto? m?g?by mi przerobi? albo wyt?umaczyc dlaczego dostaje taki wysyp na konsoli i skrypt nie dzia?a
restart Info_Bot
[2015-08-11 21] restart: Requested by Console
[2015-08-11 21] restart: Resource restarting...
[2015-08-11 21] Stopping Info_Bot
[2015-08-11 21] Starting Info_Bot
[2015-08-11 21] WARNING: Script 'Info_Bot/info.lua' is not encoded in UTF-8. Loading as ANSI...
[2015-08-11 21] SCRIPT ERROR: Info_Bot/info.lua:1: unexpected symbol near '?'
[2015-08-11 21] ERROR: Loading script failed: Info_Bot/info.lua:1: unexpected symbol near '?'
[2015-08-11 21] Info_Bot restarted successfully
tutaj kod kt?ry w razie czego przerobi?
local messages = [
"#00ff00[Kontakt]#ff0000Skype:Marcin.Pawlicki34" ,
"#00ff00[INFO]#ff00ffG??wnym wlascicielem jest Marcin" ,
"#ff0000[Administracja]#00ff00Naszymi administratorami sa:Marcin,Niventill,NerQ" ,
"##00ff00[PSDZ]#467389W sprawie kupna rangi do Marcina" ,
}
local r , g , b = 255 , 255 , 0
local stime = 60
setTimer (
function()
local msg = messages [ math . random [ 1 , #messages]
outputChatBox ( msg , getRootElement (), r , g , b , true )
end ,
stime * 1000 , 0
)
Daje piwko i repke
Nie aktualne! mo?na usun?? :-)
Ostatnio zmieniony przez #404 2015-08-11, 22:38, w całości zmieniany 1 raz
Wysłany: 2015-08-15, 16:15
NoNi3zle
Uczeń LUA
Wiek: 24 Na forum: 4179 dni Posty: 42
Nick w MP: NoNi3zle
Piwa : 78
Wysłany: 2015-08-16, 01:37
Trador232
Wiek: 26 Na forum: 3950 dni Posty: 6
Nick w MP: TradoR
Piwa : 1
Wysłany: 2015-08-16, 19:48
NoNi3zle
Uczeń LUA
Wiek: 24 Na forum: 4179 dni Posty: 42
Nick w MP: NoNi3zle
Piwa : 78
"Trador232" napisał/a :
Licze na piwko.
-- Create the shield / change the model
function clientshieldstarter ( theResource )
if ( theResource == getThisResource () ) then
local txd_shield = engineLoadTXD ( "riot_shield.txd" )
engineImportTXD ( txd_shield , 1631 )
local col_shield = engineLoadCOL ( "riot_shield.col" )
local dff_shield = engineLoadDFF ( "riot_shield.dff" , 1631 )
engineReplaceCOL ( col_shield , 1631 )
engineReplaceModel ( dff_shield , 1631 )
end
end
addEventHandler ( "onClientResourceStart" , root , clientshieldstarter )
function shieldingyet ()
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Police" ) ) then
local currenttask = getPedSimplestTask ( localPlayer )
if shieldon ~= 1 then
if currenttask == "TASK_SIMPLE_PLAYER_ON_FOOT" and getControlState ( "jump" ) == true and getControlState ( "aim_weapon" ) == true then
currentweapon = getPedWeapon ( localPlayer )
shieldon = 1
triggerServerEvent ( "shieldup" , localPlayer , localPlayer )
end
elseif shieldon == 1 then
if currenttask ~= "TASK_SIMPLE_PLAYER_ON_FOOT" or getControlState ( "jump" ) == false or getControlState ( "aim_weapon" ) == false then
shieldon = 0
triggerServerEvent ( "shielddown" , localPlayer , currentweapon )
end
end
end
end
function shieldLeggDamageControl ( attacker , weapon , bodypart )
if ( bodypart == 7 or bodypart == 8 ) and ( shieldon == 1 ) then
cancelEvent ()
end
end
addEventHandler ( "onClientPlayerDamage" , localPlayer , shieldLeggDamageControl )
function shieldtimer ( key , keyState )
if isObjectInACLGroup ( "user." .. playerName , aclGetGroup ( "Police" ) ) then
local theWeapon = getPedWeapon ( localPlayer )
if ( theWeapon == 3 ) then
if keyState == "down" then
blockcheck = setTimer ( shieldingyet , 300 , 0 , localPlayer )
else
if blockcheck then
killTimer ( blockcheck )
blockcheck = nil
if shieldon == 1 then
shieldon = 0
triggerServerEvent ( "shielddown" , localPlayer , currentweapon )
end
end
end
end
end
end
bindKey ( "jump" , "both" , shieldtimer )
Tagi: prośby :: przerobienie :: skryptu
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: