-
Posts
656 -
Joined
-
Last visited
-
Days Won
2
Everything posted by John Smith
-
what?that checking wiki part is not related to your section(scripting) it's related to the question itself
-
how about checking wiki next time before posting things like this? in every bigger version update, changelog is found on wiki like this one https://wiki.multitheftauto.com/wiki/Changes_in_1.4.1
-
Trazim skripte; Reklamiram tude servere; Dijelim Admine !!
John Smith replied to LaKi's topic in Balkan
Aj još jednom to napiši i ja ću te prijaviti Blokkeru. +1 -
Your example wasn't working in correct angle anyway i have tried this thing with a marker(it can be done with colshape too if prefered) and it's actually very easy to achieve what i tried to do here's it if anyone needs it local marker = createMarker(0,0,4,"corona",3,255,0,0,255) function ion(hitElement) if source == marker then local x,y,z = getElementVelocity(hitElement) setElementVelocity(hitElement,-x,-y,z+0.5) -- throw element away from marker in opposite direction end end addEventHandler("onMarkerHit",marker,ion)
-
i still am not sure how to predict where a projectile will be shot at with regular weapons and creating projectiles onto them its easy because of the functions getPedTargetStart and getPedTargetEnd can this (creating projectiles from turret towards point that turret is facing) be done with getting camera matrix or something? i just want to increase the distance where rhino can shoot at edit: maybe with useful function getPositionFromElementOffset? -- function getPositionFromElementOffset(element,offX,offY,offZ) local m = getElementMatrix ( element ) -- Get the matrix local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1] local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2] local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3] return x, y, z end
-
hello i am planning to re-create my userpanel from scratch and one of the features i want to implement is that blur thing basically when you open the userpanel the current gameplay screen gets blurred with a shader anyone knows a good blur shader and how to use it in this case to show/hide ?
-
I can not do this for all my files. if I do this, my server will always have download, I think you as a programmer should know this. do not you think? Wow it will always have approximately 300 kb of download That must be a disaster.
-
https://wiki.multitheftauto.com/wiki/En ... ODDistance
-
exports.admin:getPlayerCountry - clientside problem
John Smith replied to John Smith's topic in Scripting
no, it works clientsidedly because i once made my own scoreboard and used this function without modifying admin resource on runcode both clientsided and serversided return false only issue that i see could be causing this is me having local ip(e.g 192.168.1.1) could that thing cause issues? -
hi exports.admin:getPlayerCountry(localPlayer) error: failed to call: 'admin:getPlayerCountry' [string "?"] admin resource is running and not corrupted. anyone knows why is this happening?
-
try onClientCursorMove or onClientMoveMouse
-
getPlayerIdleTime -- the main "event" could be using a timer every '?' seconds/minutes to check player's idle time -- other events: onClientMinimize onClientRestore onClientKey onClientClick
-
How to replace a MTA model to multiple models? Possible?
John Smith replied to Enkanet's topic in Scripting
It's possible with shaders Orrr you could load for specific client a different model because this is client side scripting -
givePlayerMoney(math.floor(score))
-
math.floor -- or math.ceil -- e.g math.floor(score)
-
using custom animations on MTA is currently impossible. that feature might come in later versions of MTA.
-
Balkan MTA zajednica (predlog) / Balkans MTA Community (sug)
John Smith replied to .:DoA:.Backflip's topic in Balkan
ili mozete ako zelite dobru performansu i sve nakon par tjedana (nakon sto se ponovo otvori) insane hosting, mozete od njih uzeti server, stvarno su dobri i jako su jeftini(30 slotova 2 dolara samo) i ima ddos zastita,1-10gb brzina servera i sve, bili su zatvoreni a otvorit ce se ponovo u par tjedana pa eto ako ocete. -
didn't know that, thank you again
-
i thought that xml files were only files ending with .xml anyway thanks for quick answer guys
-
hi umm how can i retrieve data of .map file? like there are things e.g model="3030" posX = "1", posY,posZ,rotX,rotY,rotZ etc how can i retrieve that data since its not an xml file? i would like to create objects depending on what's written in mta .map file about objects of a map thanks in advance
-
izgleda da ce XeoN ozivit ovaj balkanski podforum
-
It just didnt work in runcode. I couldnt use if variable == v then table.remove(table,i) end I wouldnt need to use something like this instead to delete something if variable == v[somenumber][anothernumber] then ...
