Jump to content

HUNGRY:3

Members
  • Posts

    395
  • Joined

  • Last visited

Everything posted by HUNGRY:3

  1. if(weapon_name == "weapon_plane") then local USAteam = getTeamFromName("USA") if (USAteam) then if(player_money >= tonumber(price_plane)) then takePlayerMoney(source, tonumber(price_plane)) local x,y,z = getElementPosition(source) local vehicle = createVehicle(476,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You have bought a plane.", source, 0, 255, 0) end else local Axisteam = getTeamFromName("Axis") if (Axisteam) then if(player_money >= tonumber(price_plane)) then takePlayerMoney(source, tonumber(price_plane)) local x,y,z = getElementPosition(source) local vehicle = createVehicle(446,-2117.46, -2340.69, 100 + 3) warpPedIntoVehicle(source,vehicle) fadeCamera(source, true) setCameraTarget(source, source) outputChatBox("You have bought a plane.", source, 0, 255, 0) end else outputChatBox("You do not have enough money to buy a plane.", source, 255, 0, 0) end end end
  2. HUNGRY:3

    attach

    try this function fireRocks () local rock = createObject ( 3930, -2815.18, 470.16, 4.86, 0, 354.488, 0 ) local weapon = createWeapon ("Molotov", -2815.18, 470.16, 4.86 ) local fire = createFire ( -2815.18, 470.16, 4.86, 2) attachElements ( rock, weapon, 0, 0, 2 ) setTimer ( createFire, 1000, 0,fire) end addCommandHandler ( "fire", fireRocks )
  3. HUNGRY:3

    attach

    function fireRocks () rock = createObject (3930, -2588.91, 83.9, 4.48, 90, 0, 0 ) name = createFire ( 0, 0, 0, 2) attachElements ( name, rock, 0, 0, 2 ) end addCommandHandler("fire", fireRocks)
  4. You should post here viewforum.php?f=177
  5. There is admin system for dayz type /add admin (player name) Which allow you to respawn vehicle with command /svp and it make a player tag in "o" panel there is no other panel ... Only if u use steady dayz admin panel https://community.multitheftauto.com/in ... s&id=11210
  6. Hmmm weird. Restart your server?
  7. put this on acl.xml in the admin thing..: "resource.DayZ"> "resource.login"> "resource.slothbot">
  8. viewtopic.php?f=108&t=67901&hilit=ffs+in+your+dayz
  9. this is my way.. it works for all the reslutions local screenW, screenH = guiGetScreenSize() GUIEditor.staticimage[1] = guiCreateStaticImage((217/1920)*screenW, (79/1080)*screenH, 647, 558, "panel.png", false)
  10. HUNGRY:3

    Anti teamkill

    function teamkill(attacker, target ) if isPedInVehicle(attacter) then if (getElementModel ( attacker ) == 432) then if (getElementModel ( target ) == 432) then outputChatBox ( "Don't attack friendly tanks!",attacker, 255, 0, 0 ) fixVehicle( target ) end end end end addEventHandler ( "onVehicleDamage", root, teamkill ) idk if it will work
  11. HUNGRY:3

    Anti teamkill

    function teamkill(attacker, target ) if isPedInVehicle(attacter) then if (getElementModel ( attacker ) == 432) then if (getElementModel ( target ) == 432) then outputChatBox ( "Don't attack friendly tanks!",attacker, 255, 0, 0 ) cancelEvent() end end end end addEventHandler ( "onVehicleDamage", root, teamkill ) If there is a error please post it
  12. HUNGRY:3

    Permisson

    Hello How To Give Permission for player to do a command if there's only one player in server i'm trying to do it in this code: function startgame() for index, players in ipairs ( getElementsByType("player") ) do if getElementData(players,"rob") == true then setElementData(players,"crob1",true) setElementData(players,"crob2",true) setElementData(players,"crob3",true) outputChatBox("* Game Has Started!",getRootElement(),255,0,0) end end end addCommandHandler("startgame",startgame)
  13. HUNGRY:3

    Anti teamkill

    if (getElementModel ( attacker ) == 0)
  14. HUNGRY:3

    Anti teamkill

    just an example function noshootteam(attacker, target ) if isPedInVehicle(attacter) then if getElementData( attacker,"cop") == true then if getElementData( target,"cop") == true then outputChatBox ( "Don't Shoot Your TeamMates!",attacker, 255, 0, 0 ) cancelEvent() end end end end addEventHandler ( "onClientPlayerDamage", root, noshootteam )
  15. hello i want the output to output for the player who click the button [CLIENT SIDE] but it output for everybody it works in server side if we put thePlayer or... in client side it won't work. lp = getLocalPlayer() function buy15() player_money = getPlayerMoney(lp) if source == GUNPANEL1.button[15] then if ( player_money >= 100000) then setElementData(lp,"lvl1",false) setElementData(lp,"lvl2",false) setElementData(lp,"lvl3",false) setElementData(lp,"lvl4",false) setElementData(lp,"lvl5",false) setElementData(lp,"lvl6",false) setElementData(lp,"lvl7",false) setElementData(lp,"lvl8",false) setElementData(lp,"lvl9",false) setElementData(lp,"lvl10",false) setElementData(lp,"lvl11",false) setElementData(lp,"lvl12",false) setElementData(lp,"lvl13",false) setElementData(lp,"lvl14",false) setElementData(lp,"lvl15",true) outputChatBox("WEAPON USED",255,0,0) guiSetText(GUNPANEL1.edit[1], "ROCKET LAUCHER") end end end addEventHandler("onClientGUIClick", root, buy15)
  16. HUNGRY:3

    Mod Panel

    thePlayer is not defined Try this function permission (thePlayer) local accName = getAccountName ( getPlayerAccount ( player ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "Moderator" ) ) then triggerClientEvent(thePlayer,"openModerator", getRootElement()) end end bindKey ( thePlayer,"o", "down", permission )
  17. HUNGRY:3

    Dx

    lp = getLocalPlayer() addEventHandler("onClientRender", resourceRoot, function () if getElementData(lp,"panel") == true then label = guiCreateLabel(278, 325, 247, 49, "Test", false) memo = guiCreateMemo(606, 277, 466, 381, "", false) dx1 = dxDrawRectangle(262, 243, 846, 464, tocolor(13, 13, 13, 227), false) dx2 = dxDrawRectangle(279, 323, 246, 55, tocolor(14, 11, 11, 227),false) end end ) function onClickBtnTest() if source == label then testtxt = fileOpen("test.txt", true) test1 = fileRead(testtxt, 50000) guiSetText(memo, test1) end end addEventHandler("onClientGUIClick", root, onClickBtnTest) function noob() setElementData(lp,"panel",true) showCursor(true) end bindKey("F1","down",noob) this is my way idk if it will work :3
  18. HUNGRY:3

    GameMode

    addEventHandler("onResrourceStart", resourceRoot, function() setGameType("Your GameMode") end ) addEventHandler("onResourceStart", resourceRoot, -- u did a mistake not Resrouces function() setGameType("Your GameMode") end )
  19. You mean DayZ? They Removed /Svp command in the update
×
×
  • Create New...