-
Posts
395 -
Joined
-
Last visited
Everything posted by HUNGRY:3
-
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
-
Cool Good job
-
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 )
-
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)
-
You should post here viewforum.php?f=177
-
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
-
Hmmm weird. Restart your server?
-
put this on acl.xml in the admin thing..: "resource.DayZ"> "resource.login"> "resource.slothbot">
-
viewtopic.php?f=108&t=67901&hilit=ffs+in+your+dayz
-
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)
-
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
-
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
-
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)
-
if (getElementModel ( attacker ) == 0)
-
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 )
-
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)
-
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 )
-
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
-
You mean DayZ? They Removed /Svp command in the update
