2013martin1212 Posted August 12, 2015 Share Posted August 12, 2015 I want to this script to spawn the object automaticali on the server with x y position on the map i have this script function tentadayz(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then do local x, y, z = getElementPosition(thePlayer) tent = createObject(964, x + 5, y, z - 1) tentCol = createColSphere(x + 5, y, z, 4) attachElements(tentCol, tent, 0, 0, 0) setElementData(tentCol, "parent", tent) setElementData(tent, "parent", tentCol) setElementData(tentCol, "tent", true) setElementData(tentCol, "vehicle", true) setElementData(tentCol, "MAX_Slots", 500) setElementData(tentCol, "M4", 100) setElementData(tentCol, "Dmr", 100) setElementData(tentCol, "Dmr Mag", 300) setElementData(tentCol, "M4 Mag", 100) setElementData(tentCol, "AK-47", 400) setElementData(tentCol, "AK Mag", 100) setElementData(tentCol, "Coyote Backpack", 50) setElementData(tentCol, "Toolbox", 100) setElementData(tentCol, "Desert Eagle Mag", 100) setElementData(tentCol, "Desert Eagle", 100) setElementData(tentCol, "Ghillie Suit", 50) setElementData(tentCol, "DMR Mag", 100) setElementData(tentCol, "DMR", 100) end else end outputChatBox("egy lada fegyver lekerve!", thePlayer, 100, 255, 100) end addCommandHandler("lada-fegyver", tentadayz) Link to comment
KariiiM Posted August 12, 2015 Share Posted August 12, 2015 What's wrong with this code? Link to comment
2013martin1212 Posted August 12, 2015 Author Share Posted August 12, 2015 i want to the tent to spawn 0,0,0 cordinates automaticaly and not with the command Link to comment
KariiiM Posted August 12, 2015 Share Posted August 12, 2015 2013martin1212 said: i want to the tent to spawn 0,0,0 cordinates automaticaly and not with the command With timer? or when you start the resource? Link to comment
2013martin1212 Posted August 12, 2015 Author Share Posted August 12, 2015 with the resource was start and i want to restart the resource each 30 sec Link to comment
t3wz Posted August 12, 2015 Share Posted August 12, 2015 x, y, z = 0, 0, 3 function tentadayz() tent = createObject(964, x + 5, y, z - 1) tentCol = createColSphere(x + 5, y, z, 4) attachElements(tentCol, tent, 0, 0, 0) setElementData(tentCol, "parent", tent) setElementData(tent, "parent", tentCol) setElementData(tentCol, "tent", true) setElementData(tentCol, "vehicle", true) setElementData(tentCol, "MAX_Slots", 500) setElementData(tentCol, "M4", 100) setElementData(tentCol, "Dmr", 100) setElementData(tentCol, "Dmr Mag", 300) setElementData(tentCol, "M4 Mag", 100) setElementData(tentCol, "AK-47", 400) setElementData(tentCol, "AK Mag", 100) setElementData(tentCol, "Coyote Backpack", 50) setElementData(tentCol, "Toolbox", 100) setElementData(tentCol, "Desert Eagle Mag", 100) setElementData(tentCol, "Desert Eagle", 100) setElementData(tentCol, "Ghillie Suit", 50) setElementData(tentCol, "DMR Mag", 100) setElementData(tentCol, "DMR", 100) end tentadayz() setTimer ( tentadayz, 30 * 1000, 0 ) Link to comment
2013martin1212 Posted August 12, 2015 Author Share Posted August 12, 2015 Thanks its works fine , and KariiiM i have an other can u help me abot the saving system ? i want to move the internal.db to mysql its is possible to do it ? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now