Jump to content

John_Scott

Members
  • Posts

    122
  • Joined

  • Last visited

Everything posted by John_Scott

  1. John_Scott

    Map list

    Hi, I would like to create a map list to my Race server, so when the player press a button, a GUI GridList opened, and in the list the player can see the all maps in the server. How i can do this? How i can write the map names to the GridList? Thanks for help!
  2. Hi, I have a problem with the race mod. I would like to set the GM, to never respawn the player, when he dead (fall down). When i change the respawn time in settings to 0, por false, the respawn not changed. How i can turn off the respawn in race gamemode? Thanks for help!
  3. No, not this is the problem, the script not perceive when i go to marker
  4. Hi! I write a script to MTA DayZ, when the admin hit the marker, the skin was changed, food and drink was filed up, but only work the first function in the script: local skinMarker = createMarker ( -1485, 2631.3999023438, 57.799999237061, "cylinder", 1, 252, 252, 252, 30 ) local foodMarker = createMarker ( -1477.500488281, 2642.3999023438, 57.599998474121, "cylinder", 1, 0, 107, 255, 30 ) local drinkMarker = createMarker ( -1477.500488281, 2641.08, 57.599998474121, "cylinder", 1, 0, 107, 255, 30 ) function skinMarkerHit( playersource ) local accName = getAccountName ( getPlayerAccount ( playersource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) or aclGetGroup ( "SuperModerator" )) then setElementData(playersource, "skin", "217") --Skin beállítása outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Felvetted a munkaruhát.", playersource, 255, 255, 255, true) else outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Nem vagy admin", playersource, 255, 255, 255, true) end end function foodMarkerHit( playersource ) local accName = getAccountName ( getPlayerAccount ( playersource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) or aclGetGroup ( "SuperModerator" )) then setElementData(playersource, "food", "1000") --Étel feltöltése outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Kivettél egy csokit.", playersource, 255, 255, 255, true) else outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Nem vagy admin", playersource, 255, 255, 255, true) end end function drinkMarkerHit( playersource ) local accName = getAccountName ( getPlayerAccount ( playersource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) or aclGetGroup ( "SuperModerator" )) then setElementData(playersource, "drink", "1000") --Ital feltöltése outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Kivettél egy jéghideg üdítőt", playersource, 255, 255, 255, true) else outputChatBox("#ffffff[#DF3A01Z-Land DayZ#ffffff]: #0489B1Nem vagy admin", playersource, 255, 255, 255, true) end end addEventHandler( "onMarkerHit", skinMarker, skinMarkerHit ) addEventHandler( "onMarkerHit", foodMarker, foodMarkerHit ) addEventHandler( "onMarkerHit", drinkMarker, drinkMarkerHit )
  5. Hi! I would like to make a script, witch show the player's name on the top of the character by 30-40 meters only for admins. How i can this? Thanks for help!
  6. Hello! I would like to make a script, witch help to the admins. When the player have a problem, just write: /report [message] and everybody who in the Admin, SuperModerator, Moderator and Supporter group, see the message. Thanks for help!
  7. Hi, I would like to make a resource, witch mute the player to 5 minuter when he say any obscene world in hes message in the chat. Can someone help me about this? Thanks for help!
  8. Yes, i'm in ADMIN account and not working
  9. Not working I enter "/asay test message" and nothing.
  10. Hi, I made a resource to i can write to the chat as admin. (/asay [message]). When i write the command, for example: /asay one two, the script write to the chat onty "one", so always just the first word. My resource: function sendMsg(playersource, cmd, msg) local accName = getAccountName ( getPlayerAccount ( playersource ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Admin" ) ) then local msg = tostring(msg) if msg then outputChatBox(msg, getRootElement(), 255, 0, 0) else outputChatBox("Használat: /asay <üzenet>", player) --Usage end else outputChatBox ( "#ffffff[#DF3A01Z-Land DayZ#ffffff]: #FF0000Nincs jogosultságod a parancs használatához!", 255, 255, 255, true ) --No permission end end addCommandHandler ( "asay", sendMsg ) Thanks for help!
  11. I want to this on server-side
  12. client-sided outputChatBox does not have a 'visibleTo' param, also there is no need for onClientResourceStart. local mRed = 255 local mGreen = 255 local mBlue = 255 local theMessages = { 'Message 1', 'Message 2', 'Message 3', 'Message 4', 'Message 5', 'Message 6' } setTimer(outputChatBox, 1000 * 60 * 5, 0, theMessages[math.random(#theMessages)], mRed, mGreen, mBlue, true) Not working too, what start the function?
  13. Where are u from? And your script doesn't work.
  14. Hi! I would like to write or get a Automatic Message script to my server. This script write a random text to the chat in every 5 minutes. Can someone help me? Thanks!
  15. local query = dbPoll(dbQuery(connect, "INSERT INTO `test`.`meghivottak` (`id`, `serial`, `meghivo`) VALUES (NULL, '"..playerSerial.."', '"..meghivoNeve.."');"),-1) -- Vislzát http://kepfeltoltes.hu/130806/mta-scree ... es.hu_.png
  16. Hi! I some days ago write a SMS Shop system for my DayZ server, but not working too good The essence is, When player press F10, he show the SHOP Informations, when click 'Next' he show the all buyable items in categories: Guns, Ammo, Other in three gridlist. When the player select an item, and click to + Add cart, the item move to cart, when click again, the item's amount in cart grow +1. This part not working, i can't increase the item's amount only in cart. Client side script: local show = false local value = 0 local value2 = 0 local phone = "HIBA" local code = "HIBA" --Csomagok változója local EasyP = "Easy - 160Ft" local MediumP = "Medium - 400Ft" local HardP = "Hard - 800Ft" local UltraP = "Ultra - 1600Ft" local selectedPackage = "HIBA" --Fegyverek halmaza local guns = { M4={ID=01, Name="M4", Value=150, Amount=1}, AK_47={ID=02, Name="AK-47", Value=125, Amount=1}, CZ_550={ID=03, Name="CZ 550", Value=199, Amount=1}, Winchester={ID=04, Name="Winchester", Value=50, Amount=1}, MP5A5={ID=05, Name="MP5A5", Value=80, Amount=1}, SPAZ_12={ID=06, Name="SPAZ-12", Value=100, Amount=1}, Lee_Enfield={ID=07, Name="Lee Enfield", Value=120, Amount=1}, Sawn_Off={ID=08, Name="Sawn-Off", Value=80, Amount=1}, PDW={ID=09, Name="PDW", Value=30, Amount=1}, M9_SD={ID=010, Name="M9 SD", Value=30, Amount=1}, M1911={ID=011, Name="M1911", Value=30, Amount=1}, Desert_Eagle={ID=012, Name="Desert Eagle", Value=70, Amount=1}, Grenade={ID=013, Name="Grenade", Value=50, Amount=1} } --Lőszerek halmaza local ammo = { M4={ID=101, Name="M4", Value=8, Amount=20}, AK_47={ID=102, Name="AK-47", Value=10, Amount=30}, CZ_550={ID=103, Name="CZ 550", Value=5, Amount=5}, Winchester={ID=104, Name="Winchester", Value=1, Amount=7}, MP5A5={ID=105, Name="MP5A5", Value=2, Amount=20}, SPAZ_12={ID=106, Name="SPAZ-12", Value=2, Amount=7}, Lee_Enfield={ID=107, Name="Lee Enfield", Value=5, Amount=10}, Sawn_Off={ID=108, Name="Sawn-Off", Value=5, Amount=6}, PDW={ID=109, Name="PDW", Value=2, Amount=30}, M9_SD={ID=110, Name="M9 SD", Value=2, Amount=15}, M1911={ID=111, Name="M1911", Value=2, Amount=7}, Desert_Eagle={ID=112, Name="Desert Eagle", Value=4, Amount=7} } -- Ez teszt jelleggel, minden elem hozzáadva a kosár halmazhoz is, a végén külön ezek mennyiségét növelve local cart = { --GUNS-- M4={ID=01, Name="M4", Value=150, Amount=0}, AK_47={ID=02, Name="AK-47", Value=125, Amount=0}, CZ_550={ID=03, Name="CZ 550", Value=199, Amount=0}, Winchester={ID=04, Name="Winchester", Value=50, Amount=0}, MP5A5={ID=05, Name="MP5A5", Value=80, Amount=0}, SPAZ_12={ID=06, Name="SPAZ-12", Value=100, Amount=0}, Lee_Enfield={ID=07, Name="Lee Enfield", Value=120, Amount=0}, Sawn_Off={ID=08, Name="Sawn-Off", Value=80, Amount=0}, PDW={ID=09, Name="PDW", Value=30, Amount=0}, M9_SD={ID=010, Name="M9 SD", Value=30, Amount=0}, M1911={ID=011, Name="M1911", Value=30, Amount=0}, Desert_Eagle={ID=012, Name="Desert Eagle", Value=70, Amount=0}, Grenade={ID=013, Name="Grenade", Value=50, Amount=0}, --AMMO-- M4_Mag={ID=101, Name="M4", Value=8, Amount=0}, AK_47_Mag={ID=102, Name="AK-47", Value=10, Amount=0}, CZ_550_Mag={ID=103, Name="CZ 550", Value=5, Amount=0}, Winchester_Mag={ID=104, Name="Winchester", Value=1, Amount=0}, MP5A5_Mag={ID=105, Name="MP5A5", Value=2, Amount=0}, SPAZ_12_Mag={ID=106, Name="SPAZ-12", Value=2, Amount=0}, Lee_Enfield_Mag={ID=107, Name="Lee Enfield", Value=5, Amount=0}, Sawn_Off_Mag={ID=108, Name="Sawn-Off", Value=5, Amount=0}, PDW_Mag={ID=109, Name="PDW", Value=2, Amount=0}, M9_SD_Mag={ID=110, Name="M9 SD", Value=2, Amount=0}, M1911_Mag={ID=111, Name="M1911", Value=2, Amount=0}, Desert_Eagle_Mag={ID=112, Name="Desert Eagle", Value=4, Amount=0} } --Csomag kalkulálása function calculateValue () if ( value > 0 ) then guiSetText( package, EasyP ) selectedPackage = EasyP value2 = 160 phone = "(90) 444-154" end if ( value > 160 ) then guiSetText( package, MediumP ) selectedPackage = MediumP value2 = 400 phone = "(90) 888-112" end if ( value > 400 ) then guiSetText( package, HardP ) selectedPackage = HardP value2 = 800 phone = "(90) 888-380" end if ( value > 800 ) then guiSetText( package, UltraP ) selectedPackage = UltraP value2 = 1600 phone = "(90) 888-405" end guiSetText( lbl_Vegosszeg_2, "Végösszeg: " .. value .. "Ft" ) guiSetText( lbl_value2, "Fizetendő: " .. value2 .. "Ft" ) end --Vásárlási információk ablak function buyInfo() local hFile = fileOpen("buyinfo.txt", true) local buffer show = true window_1 = guiCreateWindow(428, 84, 504, 430, "-- Vásárlás információk --", false) guiWindowSetSizable(window_1, false) showCursor( true ) guiSetVisible ( window_2, false ) btn_Exit_1 = guiCreateButton(13, 398, 84, 22, "Kilépés", false, window_1) guiSetProperty(btn_Exit_1, "NormalTextColour", "FFFF0000") addEventHandler ( "onClientGUIClick", btn_Exit_1, exitBuy) btn_Next_1 = guiCreateButton(355, 398, 139, 22, "Vásárlás folytatása >", false, window_1) guiSetProperty(btn_Next_1, "NormalTextColour", "FF1EFE00") addEventHandler ( "onClientGUIClick", btn_Next_1, listBuy) if (hFile) then buffer = fileRead( hFile, 3984 ) InfoMemo = guiCreateMemo( 13, 29, 481, 365, buffer, false, window_1 ) guiMemoSetReadOnly( InfoMemo, true ) fileClose(hFile) end end --Elemek kiírása function listBuy() guiSetVisible ( window_1, false ) guiSetVisible ( window_3, false ) window_2 = guiCreateWindow(432, 91, 532, 460, "-- Áruház --", false) guiWindowSetSizable(window_2, false) btn_Exit_2 = guiCreateButton(10, 428, 84, 22, "Kilépés", false, window_2) guiSetProperty(btn_Exit_2, "NormalTextColour", "FFFF0000") addEventHandler ( "onClientGUIClick", btn_Exit_2, exitBuy) btn_Next_2 = guiCreateButton(383, 398, 139, 22, "Vásárlás folytatása >", false, window_2) guiSetProperty(btn_Next_2, "NormalTextColour", "FF1EFE00") addEventHandler ( "onClientGUIClick", btn_Next_2, showCart) btn_Null = guiCreateButton(383, 426, 139, 22, "Kosár kiürítése", false, window_2) addEventHandler ( "onClientGUIClick", btn_Null, nullCart) btn_Back_1 = guiCreateButton(234, 398, 139, 22, "< Vissza", false, window_2) guiSetProperty(btn_Back_1, "NormalTextColour", "FFF8A505") addEventHandler ( "onClientGUIClick", btn_Back_1, buyInfo) --------------------------------------------------------------------------------------------------------------------------- --Fegyverek grid gridGuns = guiCreateGridList(10, 47, 169, 308, false, window_2) local gunsName = guiGridListAddColumn( gridGuns, "Név", 0.6 ) local gunsValue = guiGridListAddColumn( gridGuns, "Ár", 0.3 ) local gunsAmount = guiGridListAddColumn( gridGuns, "Mennyiség", 0.4 ) for i, v in pairs( guns ) do local gunsR = guiGridListAddRow ( gridGuns ) guiGridListSetItemText ( gridGuns, gunsR, gunsName, v.Name, false, false ) guiGridListSetItemText ( gridGuns, gunsR, gunsValue, v.Value .. "Ft", false, false ) guiGridListSetItemText ( gridGuns, gunsR, gunsAmount, v.Amount, false, false ) end --------------------------------------------------------------------------------------------------------------------------- -- Lőszer grid gridAmmo = guiCreateGridList(189, 47, 166, 308, false, window_2) local ammoName = guiGridListAddColumn( gridAmmo, "Név", 0.6 ) local ammoValue = guiGridListAddColumn( gridAmmo, "Ár", 0.3 ) local ammoAmount = guiGridListAddColumn( gridAmmo, "Mennyiség", 0.4 ) for i, v in pairs( ammo ) do local ammoR = guiGridListAddRow ( gridAmmo ) guiGridListSetItemText ( gridAmmo, ammoR, ammoName, v.Name, false, false ) guiGridListSetItemText ( gridAmmo, ammoR, ammoValue, v.Value .. "Ft", false, false ) guiGridListSetItemText ( gridAmmo, ammoR, ammoAmount, v.Amount, false, false ) end -------------------------------------------------------------------------------------------------------- --Egyéb grid gridOther = guiCreateGridList(365, 47, 160, 308, false, window_2) toCart_1 = guiCreateButton(10, 360, 169, 22, "+ Kosárba", false, window_2) addEventHandler ( "onClientGUIClick", toCart_1, addCartGuns) toCart_2 = guiCreateButton(186, 360, 169, 22, "+ Kosárba", false, window_2) addEventHandler ( "onClientGUIClick", toCart_2, addCartAmmo) toCart_3 = guiCreateButton(365, 360, 159, 22, "+ Kosárba", false, window_2) lblGuns = guiCreateLabel(64, 24, 60, 17, "Fegyverek", false, window_2) lblAmmo = guiCreateLabel(237, 24, 60, 17, "Lőszer", false, window_2) lblFelszereles = guiCreateLabel(426, 24, 60, 17, "Felszerelés", false, window_2) lbl_Value = guiCreateLabel(236, 428, 286, 15, "Végösszeg: " .. value, false, window_2) guiSetFont(lbl_Value, "default-bold-small") guiLabelSetColor(lbl_Value, 253, 0, 0) end -- Továbblépés a kosárhoz function showCart () if ( value > 1600 ) then outputChatBox( "Túl nagy végösszeg!" ) else if ( #cart < 1 ) then outputChatBox( "Üres a kosár!" ) else guiSetVisible ( window_1, false ) guiSetVisible ( window_2, false ) window_3 = guiCreateWindow(432, 91, 532, 460, "-- Kosár tartalma --", false) guiWindowSetSizable(window_3, false) gridCart = guiCreateGridList(10, 25, 261, 364, false, window_3) local cartName = guiGridListAddColumn( gridCart, "Név", 0.85 ) local cartAmount = guiGridListAddColumn( gridCart, "Mennyiség", 0.4 ) local cartValue = guiGridListAddColumn( gridCart, "Ár", 0.4 ) for i, v in pairs( cart ) do if ( v.Amount > 0 ) then local cartR = guiGridListAddRow ( gridCart ) guiGridListSetItemText ( gridCart, cartR, cartName, v.Name, false, false ) guiGridListSetItemText ( gridCart, cartR, cartAmount, v.Amount, false, false ) guiGridListSetItemText ( gridCart, cartR, cartValue, v.Value, false, false ) end end local cartR = guiGridListAddRow( gridCart )
×
×
  • Create New...