Apocalypso

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

2 Neutral

About Apocalypso

  • Rank
    Newbie

Details

  • Gang
    ???
  • Location
    Latvia
  • Occupation
    Role-Player
  • Interests
    Many

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Apocalypso

    SDK Bug

    Hello amm at start - english is not my native, so i say sorry already about that... Now i will start about problem , where i cant find help, i will try to get it there... So what happened, not so long time ago - 2017 , dec... i surfed in internet, and i found something called mta sdk ( i just get UCP i guess werry broken, because rightfull owners just gived this one away in github open source full ucp) so i taked it and reedited it so much , that its worked for me too... ( bases are same open source i mean ) soo.... in this ucp are some PHP scripts about mta("IP" "port" "Name" " Pass" ) , then i searched in wiki about php sdk, and in here too, ( here i find only tutorials) so i make everything like tutorials says 1) I maked new "account" named website 2) I added it to acl under admins 3) i finded script in server and added it as admin resource in acl 4) I connected databases with new edited ucp forum + server 5) fixed resource who is called 6) started ucp and resource 7) used function from web So there starts problems, at start i thinked this is only place where it broken up, but then i realise that everywhere where sdk trys to connect to server it just... stops... the first problem is on sdk where its checks if server is online he should call resource from server where in lua is function that server is online...( server is online but it says its not) Also it does not give any errors, or bugs, it says in wiki, that there should be that website footprints in server logs its connect , but its not, basically nothing happens, not connections nothing... i asked already some friends to help who works on programming jobs. they watched LUA + PHp and said that they cant see where is problem, because its like from wiki and tutorials,... said maybe something in connection, or dots... ( but i just think its because server is like hybride on 5 different gamemodes....) still it just give 0 errors on sdk and it not connecting Heeelp? suggestions what is the problem? i did everything that says in tutorials and wiki, but still nothing.. maybe u can tell steep by steep what to try?
  2. Apocalypso

    [REL] Trains on railroads (open source)

    Two years passed and i thinked out, those flying tains.... why nobody thinks to add train only on LEFT sided rails?? those Ghosting when train goes offroad is only on RIGHT side rails, because RIGHT sided is used in main mission GTA SA , where cj jumps on trains, So it went offroad, because of main programm, so, just add trains on left side rails and it will drive whole circle in MTA map... works for me, only i cant edit that because somebody compiled it
  3. Apocalypso

    Lumberjack

    Hello again! So introduction why i write.. Well i watched youtube of old scripts, and find out one interesting script, who i added to my serv Job-System.... i updated the script and added new stuffs, to work smooth with server, Idea was that i remaked this script and make it usefull, and it worked... only now i got some problems... So how it works Script is - Client sided (job system , markers, outputchatbox, etc) because i dont need that chatbox show how many trees left to all players when they aint working or they roleplaying.. next is woods (client sided) script where i did not change anything because there is too much places of woods (redwood etc) locations all around MTA SA ... and last is Server sided : The functions what provide money, like givemoney to lumberjack and maths wheere there is shown how much and some eventcalls Problem : Those trees are showing only to those who apply jobs, and everjone got their own forrest, but when other player is near, it looks like that "lumberjack" is idiot, who runs around with chainsaw, where is no trees :D... So why there aint showing those "forest " trees to other, i know that is because that function of cut tree and animation of falling trees are "Client Sided" But when i swap it and change deffinitons of Server and client event triggers, it just amm.. fuk up all jobs.... and all debug is red...so Help please... After that i thinked to add some objects too what can be putted on car (wood log) or something, where is function givetree but if they aint showing up now there is no reason to add it here the script i edited 1) Server sided function givePlayerTree() moneyw = math.random(5,10) exports.global:giveMoney(client,moneyw) end addEvent("DGAlumberjack.GivePlayerTree", true) addEventHandler("DGAlumberjack.GivePlayerTree", root, givePlayerTree) function giveBonus() moneyMultiplier = math.random(1,2) moneyAmount = math.floor(math.random(300, 400)*moneyMultiplier) exports.global:giveMoney(client,moneyAmount) exports.hud:sendBottomNotification(client, "Darbadevējs:", "Tu saņēmi prēmiju €"..moneyAmount.." apmērā, par meža likvidēšanu...") end addEvent("DGAlumberjack.GiveBonus", true) addEventHandler("DGAlumberjack.GiveBonus", root, giveBonus) function onDFTenter(enteringPlayer) if (isElement(source)) then if (getElementModel(source) == 578) then if (getElementData(enteringPlayer, "job") == 10) then triggerClientEvent(enteringPlayer, "DGAlumberjack.JobStart", enteringPlayer) end end end end addEventHandler("onVehicleEnter", root, onDFTenter) Client sided with anim and woods function JobStart() if (not (isJobStarted)) then currentForest = math.random(#treesPositions) colCircle = createColCircle(treesPositions[currentForest]["colShape"][1], treesPositions[currentForest]["colShape"][2], 30) createBlipAttachedTo(colCircle, 0) addEventHandler("onClientColShapeHit", colCircle, onColCircleHit) for i,v in ipairs(treesPositions[currentForest]) do objAmount[i] = createObject(idList[math.random(#idList)],treesPositions[currentForest][i][1], treesPositions[currentForest][i][2], treesPositions[currentForest][i][3]) treeColShape[i] = createColCircle(treesPositions[currentForest][i][1], treesPositions[currentForest][i][2], 3.5) end treeAmount = #objAmount isJobStarted = true end end addEvent("DGAlumberjack.JobStart", true) addEventHandler("DGAlumberjack.JobStart", root, JobStart) assignMarker = nil assignBlip = nil function JobStop() if (isElement(assignMarker)) then destroyElement(assignMarker) destroyElement(assignBlip) end if (isElement(colCircle)) then colCircleBlip = getAttachedElements(colCircle)[1] if (colCircleBlip) then destroyElement(colCircleBlip) end destroyElement(colCircle) end for k, v in ipairs(objAmount) do if (isElement(v)) then local blip = getAttachedElements(v)[1] if (blip) then destroyElement(blip) end destroyElement(v) end end for k, v in ipairs(treeColShape) do if (isElement(v)) then destroyElement(v) end end isJobStarted = false objAmount = {} treeColShape = {} treeAmount = 0 end addEvent("DGAlumberjack.JobStop", true) addEventHandler("DGAlumberjack.JobStop", root, JobStop) function onColCircleHit(hitElement) if (hitElement == localPlayer) then colCircleBlip = getAttachedElements(colCircle)[1] if (colCircleBlip) then destroyElement(colCircleBlip) end destroyElement(colCircle) for k, v in ipairs(objAmount) do if (isElement(v)) then createBlipAttachedTo(v) end end end end function treeCheck() if (treeAmount == 0) then triggerServerEvent("DGAlumberjack.GiveBonus", root) JobStop() else outputChatBox("Tu nocirti koku, vēl palika: "..treeAmount,255,255,0) end end function cutTree(index) if (isElement(objAmount[index])) then local x, y, z = getElementPosition(objAmount[index]) setElementFrozen(localPlayer, true) setTimer(fadeCamera, 350, 1, false) setTimer(fadeCamera, 4800, 1, true) setTimer(setElementFrozen, 6000, 1, localPlayer, false) moveObject(objAmount[index],6000,x,y,z-10,0,90,90) setTimer(destroyTree, 7000, 1, index) destroyElement(getAttachedElements(objAmount[index])[1]) end end function destroyTree(index) if (isElement(objAmount[index])) then destroyElement(objAmount[index]) triggerServerEvent("DGAlumberjack.GivePlayerTree", root) treeAmount = treeAmount -1 treeCheck() end end local lastCount = getTickCount() function onChainsawUse() if (getPedWeapon(localPlayer) == 9) then if (not (isPedInVehicle(localPlayer))) then if (not (isElementFrozen(localPlayer))) then if (not (isCursorShowing())) then if ((getTickCount() - lastCount) > 1500) then for k, v in ipairs(treeColShape) do if (isElement(v)) then if (isElementWithinColShape(localPlayer, v)) then destroyElement(v) cutTree(k) break end end end lastCount = getTickCount() end end end end end end bindKey("mouse1", "down", onChainsawUse) And last one is just pozzitions of wods only at end is is this idList = { [1] = 696, [2] = 697, [3] = 693, } currentForest = nil mainWindow = nil colCircle = nil sellTablesButton = nil isJobStarted = false isCrafting = false objAmount = {} treeColShape = {} descLabel = {} minMaxTables = {5, 10} minMaxMoney = {} treeAmount = 0 treesCrafted = 0 treesToCraft = 0 tablesMade = 0 playerTrees = 0 playerTables = 0 Help please
  4. Apocalypso

    Server bugs

    Aint working... well output is working, but i still can punch doors... also i got this warning LUA 4: Bad argument @ 'getElementType' [Expected element at argument 1, got boolean] [DUP x3] Outpuchatbox is spaming all time when i dont look, aim on doors, then there is no warnings, but when i aim straigt on doors it say that there is no element but only bool
  5. Apocalypso

    Server bugs

    okay just tyed another style function onPlayerTarget (targetElem, thePlayer ) if ( getElementModel ( targetElem ) == 1557 ) then local px, py, pz = getElementPosition(source) local x, y, z = getElementPosition(targetElem) if tonumber(getDistanceBetweenPoints3D(x, y, z, getElementPosition(source))) < 20 then toggleControl ( source, "fire", false ) else toggleControl ( source, "fire", true ) end end end addEventHandler ( "onPlayerTarget", root, onPlayerTarget ) Now it just push some Warnings : expected element at argument 1 got boolean and it is only where are if (getelementmodel) but when i add under toggle - outputchat, its working, but still give warning errors, and toggle aint working.. well oky i think i just dont know how to do proper definiton of that model
  6. Apocalypso

    Server bugs

    .... maked a function in object client sided file.... got new problems... - debugscript 3 aint show any errors, but togglecontrol aint working.. Maked object with id 1557 its doors. then i put them on ground, and do protect on it, next i got cords of door, example 0 0 0 then i walk to 20 0 0 or 0 20 0 because in script i make that if doors x y z , player x y z < 20 then togglecontrol("fire" false) but it aint falsing... i guess i make some mistake in function start wehere i define a doors, but on other scripts where objects defined like that it works... here is function i use function disablePunch ( x, y, z, px, pz, py, model,localPlayer) if ( model == 1557 ) then local px, py, pz = getElementPosition(localPlayer) local x, y, z = getElementPosition(model) local distanc = getDistanceBetweenPoints3D(x, y, z, px, py, pz) if (distanc < 20 ) then toggleControl("fire",false) outputChatBox("Test bug 1") else toggleControl("fire",true) outputChatBox("Test bug 2") end end end addEventHandler("onClientResourceStart", getRootElement(), disablePunch) Even outputchatbox aint give those texts..
  7. Apocalypso

    Server bugs

    So i need to add some function that will find nearby elements who is about "x" feets ahead player? Amm i guess like this one? function objFix (? , ? ) local px, py, pz = getElementPosition(thePlayer) local doors = getElementsByType("object") for k, v in ipairs(doors ) do if isElement( v ) and getElementModel( v, "doors") == 1557 and ((ETC objects )) then local x, y, z = getElementPosition(object) if getDistanceBetweenPoints3D( x, y, z, px, py, pz ) < 2 then toggleControl("fire",false) else toggleControl("fire", true) end end end i guess this should help but this is just a draft for now
  8. Apocalypso

    Server bugs

    Hi... i am new here, but already need help, and i hope this is right place... So i tryed to build a server for Role-Play, well i used some base gamemode from internet, i dont remember where i got it but that does not really what i will ask about.. So.. I basically edited it , updated and even make new stuffs, like flood, narcotic systems, amm new factions like Los Santos Coast guard, mapped whole new place(Islands) , federal jail... food, drink systems, fishing system from base fish i updated it like there now can fish on big boats with nets... and added amm how it is in english... well u know objects i guess. amm and there starts bugs... or i dont even what it is.. i thinked that this is some error in my whole script... i searched about 2 monts. but then i realised other servers in my country who provide role-play, or other servers with objects, got same problem So:Basic problem 1) I spawn item 1557 (doors) 2) I edit it by arrow keys and wasd to its place, and save it and protect it (because some morons always steal it by picking up...) 3) I putted other side a gold bar worth 40 K Euros... 4) Went to sleep Next morning: 1) Doors was in place gold bar = dissapeared ... So somebody get trough unmoovable doors, okaay, i searched in logs files, the one who picked it up, find the one who stealed it, and "Nicely" asked : what the fu** man.. so he answered that there is posibility to kick or hit trough all materials (objects) who is doors but only once per dimension. So basically this bug ruin folowing resources... Gates,factions,object-system, elevators and everything else who got connected which those objects, but the point of this post is simple, this is even fixable? because for real i tryed by myself, every door could be hitted and it open for 1 time... then u do recconect and can do it again... or this is some GTA bug and i will need to live with it? thanks and sorry about bad english
  9. Hello.... Basically i first say sorry about my English language, i am not from UK or USA Also, Nice work about Cinema BUT i got some .... BIG ... amm well i better write.. i guess it is problems about cinema So i used ur script main code, and updated it to "Role-Play" Servers.... so basic idea is to improve roleplay... So editet, translated to my language, and updated a maping for "Goverment" players and here starts problems, and i cant do anything, i dont even know why this is hapening... 1) When Resource is started everything go werry smoothy.... till players join ... 1.1) Those who was in game everything was still good- Movie, music, free road.... but those who went in server after script is started, they cant freely walk around in cinema, i thinked it is problem to client side, but then when i remapped it, i find out that u use scaling in many objects such as this one <object id="object (bistro_blok) (3)" breakable="true" interior="0" collisions="false" alpha="255" model="3944" doublesided="false" scale="0.050000001" dimension="0" MSTalpha="255" posX="-1942.9" posY="422.60001" posZ="-2.6" rotX="0" rotY="0" rotZ="0"></object> i dont know exacely if it is true but u know that scale ir visual only after reconnect to server.... so basically my players cant pass that "blok" they cant see it, because of 0.05 scale, but in main it is 1... same problem was to ladeers but there i just delited it and changed to other object, but this bistro_blok is for {filename = "screen", id = "3944"}, --1952 - and u scaled it in .map file, but that scale dissapears natturally on recconet and then it is only visual... 2) Next problem - New screen curved... i guess u did your own texturing and DFF files... but there starts problems with interiors. bassically i cant anymore use "Costa Nori " mafias, amm restaurant... because when i enter interior, there is "Black HOLE" and weeeerrrry big monitor "Curved creen" So it replaces alll worlds textures Suggestion : Well i cant right now swapped object ids because i dont have such a good pc to remap it but maybe next version u can use OBJects who aint used much in world = casino tokens or something as u can see i used 1952 ID to normal screen... but on 1 he is ... werry big.... and when i scale it to 0.05 (Object normal size is like hand of player) it is still collidable... cant get trough it... so i disabled those 3 litte screens for now while i figure it out why players cant pass or u will already do new version ;d 3 ) This problem is mystic.... Because for me it aint hapened even from 1 version... but players say they can hear the sound of YOUTUBE all around San andreas map... even they are out of colshape this is why?? 3.1) Basic this problem is 70% of players in my server... they went in cinema, i put some music, video, etc.... they went out drive to commerce, and then write me that they still hear it and it kinda ruin their Roleplay... 3.2) Second problem about sound is - some of those who can hear sound all time they say they hear music there even aint played i asked what music - I putted taio cruz - there she goes.... and they say after cruz ended they can hear Iglesias music..Outside cinema.... WTF and lastly 4) Well this started on ur cinema V2... dont know why. but problem is - i cant add staff to cinema, i can add only myself and take away vip... but cant give staff/vip to others...( In FTP i can add manualy but not in server) Thanks by the way, your cinema maked, my country roleplay level higer well a bit higer