Jump to content

shoBy

Members
  • Posts

    138
  • Joined

  • Last visited

Everything posted by shoBy

  1. It doesn't work, sorry.
  2. How can I exit from the house after I created it ?
  3. I just want to put a gate but i can't because I don't know how to use theese coord. (
  4. No...I found it...That numbers 2500,1140.9000244141,1319.6999511719,6.4000000953674 are XYZ, right ?
  5. Oh...Can you help me here ? viewtopic.php?f=91&t=80335
  6. http://postimg.org/image/yapnp2w4v/ This is the dayz inventory and is in Spanish language...I want to translate it, but I don't know where I can find it.
  7. Code of the base script: RestricLocation = {} TeleportLocation = {} EnabledAlarm = true TimesToKick = {} TimeSireneEnabled = true ColCuboid = false --------------------------------------- CONFIGS -------------------------------------------- RestricLocation["location1"] = {1110.8000488281,1250.9000244141,42.599998474121} --Local PARTE DE CIMA RestricLocation["location2"] = {1167.6999511719,1327.4000244141,6.0999999046326} --LOCAL PARTE DE BAIXO TeleportLocation = {1142.4000244141,1374.8000488281,10.60000038147} --LOCAL TO TELEPORT PLAYER GroupName = "Staff" -- name of the acl/gang group !!! GroupNameBy = 1 -- 1 for gang name, 2 for ACL group ! cmdTurnON = "turnONcmd" -- Command to enable alarm / cmdTurnOFF = "TurnOFFcmd" -- Command to disable alarm / MsgtoKICK = "Area protected! Leave or kick!" MsgCantCreateCollision = "Can't be created the Collision, check your location1 and location2" EnableVehicleGodMode = true -- true enabled, false disabled. KickORBAN = 1 -- 1 for kick player, 2 for BAN BanTime = 900000 -- time in seconds of ban, 900000 sec = 15 min MsgBAN = "Invasor" -- Reason of BAN ! --------------------------------------- CONFIGS -------------------------------------------- function sendMsg(iplayer,msg) outputChatBox ( msg, iplayer, 255, 255, 255, true ) end function EnterPlace ( theElement ) if (getElementType ( theElement ) == "player") and (PlayerHaveLevel (theElement) == false) and (EnabledAlarm == true ) then if(TimesToKick[theElement] > 0) then sendMsg(theElement,MsgtoKICK ..TimesToKick[theElement]) TimesToKick[theElement] = TimesToKick[theElement] -1 setElementPosition( theElement, TeleportLocation[1], TeleportLocation[2], TeleportLocation[3]) if TimeSireneEnabled == true then triggerClientEvent ( "ActiveAlarm", getRootElement() ) end sendMsgOwners(theElement) else if (KickORBAN == 1) then kickPlayer(theElement) else banPlayer ( theElement , false, false, true, "Alarme system Base", MsgBAN, BanTime ) end end elseif getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,true) end end function ExitPlace ( theElement ) if getElementType ( theElement ) == "vehicle" then SetVehicleGodMode(theElement,false) end end function ASBenable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = true end end function ASBdisable1 ( source ) if(PlayerHaveLevel (source) == true) then EnabledAlarm = false end end function ResetStats ( ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if TimesToKick[aPlayer] == nil then TimesToKick[aPlayer] = 5 end if(TimesToKick[aPlayer] < 5) then TimesToKick[aPlayer] = TimesToKick[aPlayer] + 1 end end end function playerConnect ( playerNick ) local iPlayer = getPlayerFromName ( =GOW=brokengunman26 ) TimesToKick[iPlayer] = 5 end function PlayerHaveLevel( PlayerID ) if GroupNameBy == 1 then if ( getElementData ( PlayerID , "gang" ) == GroupName ) then return true else return false end else local accName = getAccountName ( getPlayerAccount ( PlayerID ) ) if ( isObjectInACLGroup ("user."..accName, aclGetGroup ( GroupName ) ) ) then return true else return false end end end function ResourceStart( ) LoadLocations() CreateCollision() local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do TimesToKick[aPlayer] = 5 end end addEventHandler( "onResourceStart", getResourceRootElement( getThisResource() ),ResourceStart) function LoadLocations() local RX, RY, RZ, WRX, WRX, WRX if(RestricLocation["location1"][1] > RestricLocation["location2"][1]) then RestricLocation["maxx"] = RestricLocation["location1"][1] RestricLocation["minx"] = RestricLocation["location2"][1] else RestricLocation["maxx"] = RestricLocation["location2"][1] RestricLocation["minx"] = RestricLocation["location1"][1] end if(RestricLocation["location1"][2] > RestricLocation["location2"][2]) then RestricLocation["maxy"] = RestricLocation["location1"][2] RestricLocation["miny"] = RestricLocation["location2"][2] else RestricLocation["maxy"] = RestricLocation["location2"][2] RestricLocation["miny"] = RestricLocation["location1"][2] end if(RestricLocation["location1"][3] > RestricLocation["location2"][3]) then RestricLocation["maxz"] = RestricLocation["location1"][3] RestricLocation["minz"] = RestricLocation["location2"][3] else RestricLocation["maxz"] = RestricLocation["location2"][3] RestricLocation["minz"] = RestricLocation["location1"][3] end end function CreateCollision() RX = RestricLocation["minx"] WRX = RestricLocation["maxx"] - RestricLocation["minx"] RY = RestricLocation["miny"] WRY = RestricLocation["maxy"] - RestricLocation["miny"] RZ = RestricLocation["minz"] WRZ = RestricLocation["maxz"] - RestricLocation["minz"] ColCuboid = createColCuboid ( RX, RY, RZ, WRX, WRY, WRZ ) if ColCuboid then addEventHandler ( "onColShapeHit", ColCuboid, EnterPlace ) addEventHandler ( "onColShapeLeave", ColCuboid, ExitPlace ) else outputDebugString(MsgCantCreateCollision) end end function ResourceStop( ) destroyElement ( ColCuboid ) end addEventHandler( "onResourceStop", getResourceRootElement( getThisResource() ),ResourceStop) function SireneEnabled() TimeSireneEnabled = true end function sendMsgOwners( PlayerID ) local connectedPlayers = getElementsByType ( "player" ) for i, aPlayer in ipairs(connectedPlayers) do if(PlayerHaveLevel (aPlayer) == true) then sendMsg(aPlayer," Player " ..getPlayerName ( PlayerID ) .." is trying to join in our base!") end end end function SetVehicleGodMode( VehicleID, godEoD ) if EnableVehicleGodMode == true then setElementData(VehicleID, "godmode", godEoD) setVehicleDamageProof (VehicleID, godEoD ) end end setTimer ( SireneEnabled , 20000, 0, "" ) setTimer ( ResetStats , 15000, 0, "" ) addCommandHandler("alarmon",ASBenable1) addCommandHandler("alarmoff",ASBdisable1) addEventHandler ("onPlayerConnect", getRootElement(), playerConnect) How can I get this location ? RestricLocation["location1"] = {1110.8000488281,1250.9000244141,42.599998474121} --Local PARTE DE CIMA RestricLocation["location2"] = {1167.6999511719,1327.4000244141,6.0999999046326} --LOCAL PARTE DE BAIXO TeleportLocation = {1142.4000244141,1374.8000488281,10.60000038147} --LOCAL TO TELEPORT PLAYER And this code of the gate: function createTheGate () myGate1 = createObject ( 980,1140.9000244141,1319.6999511719,12.60000038147, 0, 0, 0 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate1, 2500,1140.9000244141,1319.6999511719,6.4000000953674) end addCommandHandler("1234",openMyGate) function movingMyGateBack () moveObject ( myGate1, 2500,1140.9000244141,1319.6999511719,12.60000038147) end addCommandHandler("4321",movingMyGateBack) How can I find this location or...: moveObject ( myGate1, 2500,1140.9000244141,1319.6999511719,12.60000038147)
  8. Hey guys. Where can I translate the inventory ("j" command in game)? Is in Spanish and I want to translate it in English. Please help!
  9. Guys...I can't reload my weapon when I press "r". Why ? Can you help me, please ?
  10. Thanks Anubhav <3, XeoN-...your script wasn't good But thanks a lot guys!
  11. Here is the plugin...All files...Can you...? Please help Link: -
  12. Hi guys...I have a problem to the shop plugin... Error: Script: function BuyWeaponOnServer(weapon_name,data,value) player_money = getPlayerMoney(source) if(weapon_name == "weapon_CZ550") then if ( player_money >= 1000) then setElementData(source,"CZ 550",getElementData(source,"CZ 550") + 1) setElementData(source,"CZ 550 Mag",getElementData(source,"CZ 550 Mag") + 25) takePlayerMoney(source, 1000) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_DesertEagle") then if ( player_money >= 300) then setElementData(source,"Desert Eagle",getElementData(source,"Desert Eagle") + 1) setElementData(source,"Desert Eagle Mag",getElementData(source,"Desert Eagle Mag") + 35) takePlayerMoney(source, 300) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_Granada") then if ( player_money >= 500) then setElementData(source,"Grenade",getElementData(source,"Grenade") + 1) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_M4") then if ( player_money >= 800) then setElementData(source,"M4",getElementData(source,"M4") + 1) setElementData(source,"M4 Mag",getElementData(source,"M4 Mag") + 60) takePlayerMoney(source, 800) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_AK47") then if ( player_money >= 700) then setElementData(source, "AK-47",getElementData(source,"M4") + 1) setElementData(source,"AK Mag",getElementData(source,"M4 Mag") + 120) takePlayerMoney(source, 700) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(weapon_name == "weapon_M9SD") then if ( player_money >= 500) then setElementData(source, "M9 SD",getElementData(source,"M4") + 1) setElementData(source,"M9 SD Mag",getElementData(source,"M4 Mag") + 75) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyWeapon", true) addEventHandler("onClientBuyWeapon", getRootElement(), BuyWeaponOnServer) --- Comida function BuyWeaponOnServer(food_name,data,value) player_money = getPlayerMoney(source) if(food_name == "Comida_Pizza") then if ( player_money >= 30) then setElementData(source, "Pizza",getElementData(source,"Pizza") + 5) takePlayerMoney(source, 30) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Milk") then if ( player_money >= 30) then setElementData(source, "Milk",getElementData(source,"Milk") + 5) takePlayerMoney(source, 30) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Cooked") then if ( player_money >= 60) then setElementData(source, "Cooked Meat",getElementData(source,"Cooked Meat") + 5) takePlayerMoney(source, 60) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_Soda") then if ( player_money >= 50) then setElementData(source, "Soda Bottle",getElementData(source,"Soda Bottle") + 5) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_BeansCan") then if ( player_money >= 40) then setElementData(source, "Beans Can",getElementData(source,"Beans Can") + 4) takePlayerMoney(source, 40) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(food_name == "Comida_WaterBottle") then if ( player_money >= 50) then setElementData(source, "Water Bottle",getElementData(source,"Water Bottle") + 5) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyComida", true) addEventHandler("onClientBuyComida", getRootElement(), BuyWeaponOnServer) --- Outros function BuyWeaponOnServer(outros_name,data,value) player_money = getPlayerMoney(source) if(outros_name == "Outro_Alice") then if ( player_money >= 300) then setElementData(source, "MAX_Slots" , 22 ) takePlayerMoney(source, 300) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Road") then if ( player_money >= 10) then setElementData(source, "Roadflare",getElementData(source,"Roadflare") + 1) takePlayerMoney(source, 10) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Wire") then if ( player_money >= 50) then setElementData(source, "Wire Fence",getElementData(source,"Wire Fence") + 1) takePlayerMoney(source, 50) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Czech") then if ( player_money >= 600) then setElementData(source, "MAX_Slots" , 30 ) takePlayerMoney(source, 600) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(outros_name == "Outro_Full") then if ( player_money >= 300) then setElementData(source, "Full Gas Canister",getElementData(source,"Full Gas Canister") + 2) takePlayerMoney(source, 300) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyOutros", true) addEventHandler("onClientBuyOutros", getRootElement(), BuyWeaponOnServer) --- Municao function BuyWeaponOnServer(municao_name,data,value) player_money = getPlayerMoney(source) if(municao_name == "Municao_CZ550Mag") then if ( player_money >= 500) then setElementData(source, "CZ 550 Mag",getElementData(source,"CZ 550 Mag") + 25) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_MP5Mag") then if ( player_money >= 100) then setElementData(source, "MP5A5 Mag",getElementData(source,"MP5A5 Mag") + 60) takePlayerMoney(source, 100) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_PDWMag") then if ( player_money >= 200) then setElementData(source, "PDW Mag",getElementData(source,"PDW Mag") + 60) takePlayerMoney(source, 200) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_WinchesterMAG") then if ( player_money >= 200) then setElementData(source, "1866 Slug",getElementData(source,"1866 Slug") + 21) takePlayerMoney(source, 200) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_AKMag") then if ( player_money >= 400) then setElementData(source, "AK Mag",getElementData(source,"AK Mag") + 90) takePlayerMoney(source, 400) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end if(municao_name == "Municao_M4Mag") then if ( player_money >= 500) then setElementData(source, "M4 Mag",getElementData(source,"M4 Mag") + 80) takePlayerMoney(source, 500) outputChatBox("#FF0000[sHOP] #FFFFFFSuccesfully bought!", source, 255, 255, 255 , true) else outputChatBox("#FF0000[sHOP] #FFFFFFYou don't have enough money!", source, 255, 255, 255 , true) end end end addEvent("onClientBuyMunicao", true) addEventHandler("onClientBuyMunicao", getRootElement(), BuyWeaponOnServer)
  13. How can I stop the admin resources, and how to use addCommandHandler ?
  14. I'm working to a base system bugged, but all the players can open the gate if they know the password...When I'll be done, I'll give you it.
  15. I'll try to do anything but I don;t know if i'll do it correctly...I'm noob.
  16. And the prefix rank ? And acces to commands...Like to the helper rank you have access to kick slap mute or theese things. ?
  17. Hey guys, I want to know, how can I close admin panel or delete it and how to install admin commands like /akill /aslap /superman /afreeze /amute /warn and other. Please help. I'm new in LUA.
  18. Matey? Just download a shader from google, and install it like a plugin. From resource and mtaserver.lua. You don't need any scripts.
×
×
  • Create New...