-
Posts
4,144 -
Joined
-
Last visited
-
Days Won
1
Everything posted by dzek (varez)
-
sweet.. well, almost function molotovHit() local px, py, pz = getElementPosition(source) outputChatBox(getElementType(source)) outputChatBox(px.."."..py.."."..pz) --createExplosion(lx, ly, lz, 1, getRootElement()) end local projectile = createProjectile (ped, 18, lx, ly, zz+0.7, 1.0, getLocalPlayer(), rx, ry, rz, dx, dy) addEventHandler("onClientElementDestroy", projectile, molotovHit) chatbox:
-
omg, HOW? sometimes ped is standing in front of SOMETHING, making the projectile hit in same time as created, sometimes ped just throw molotov in open space sometimes ped throwing molotov from the roof sometimes ped even throw molotov from big mountain.. too much cases and random things i thought is there any event that will help me get the time projectile destroy edit: I'll try that Gamesnert
-
Need Some One Who Can Make Good Scripts To Join Us !
dzek (varez) replied to Hasoon's topic in Scripting
you can do a nice job on free solutions (free website/forum script, free hosting, free e-mail space) and you can do sh*t on paid solutions (rich 11yo pays $300 for kewl-h4x-d0m4in, teh forum, etc) btw: i seen yesterday just another man, who was caring GTA:SA box in the supermarket, with his 8-11 yo kids around.. SCARY -
almost every programming language (i dont know every, but a lot) uses ";" .. probably he used to press ";"
-
100 "almost" scripts, and the game start to lag
-
good.. but i dont see "onProjectileDestroy" event or anything like that.. or should i getElementPosition everyframe, until my element exist?
-
Need Some One Who Can Make Good Scripts To Join Us !
dzek (varez) replied to Hasoon's topic in Scripting
1. you really had to undig this topic? 2. they host at gameffs, so they cant send you local ip 3. does using another domain make them professional? -
this is molotov projectile. after hitting ground it dont create the molotov explosion, so this will fail too. i need to create explosion "manually" after projectile hit the ground
-
omg, dont bump the post after SEVENTEEN MINUTES! wiki.multitheftauto.com read, there is everything..
-
too lazy for search? https://wiki.multitheftauto.com/wiki/SetPedStat all is there
-
its possible, but hey, "xX" -es, you want us to make whole server for you? one refresh, and 3 topics from you both.. remove it from map file myObj = createObject(3114, -2464.9296875, 1522.9167480459, 6.1990437507629) function liftMyObj() moveObject(myObj, 7000, -2464.9296875, 1522.9167480469, 27.570457458496) end addCommandHandler("lift", liftMyObj)
-
hi, how can i get the position where projectile hit the ground/player/whatever?
-
lol ,forgot about that too i was in work
-
look at resource "defaultstats" it comes with mta
-
he didnt tell it exactly
-
search, there was topic about it few weeks ago
-
as KWKSND said.. you have wrong name in 8th line.. this should work function move() move1 = createObject ( 8838, 3057.7666015625, -1763.40625, 0 ) moveIt() end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), move ) function moveIt () moveObject ( move1, 3057.7666015625, -1763.40625, 4 ) setTimer ( moveBack, 10000, 4 ) end function moveBack () moveObject ( move1, 3057.7666015625, -1763.40625, 0 ) setTimer (moveIt, 10000, 1 ) end
-
[Help] In about "addEventHandler" from client
dzek (varez) replied to Hyunsu_Oh's topic in Scripting
no, its not workign that way.. read some topics about difference betweeen client-side and server-side scripts, find some tutorials, and good luck btw: are you translating your text with google translate, or by yourself? -
i know, but almost no difference in looking, and ive got a lot of scripts, and they are slowing game a bit, i'll optimize the rest (some are downloaded), and new ones i wanna make perfect.. im a programmer, so im caring about details
-
i think local free=#texts+1 will be better, as if free will be global variable, there will be no difference between textCount, or even a little bit more CPU due to counting table, instead of adding 1
-
[Help] In about "addEventHandler" from client
dzek (varez) replied to Hyunsu_Oh's topic in Scripting
https://wiki.multitheftauto.com/wiki/AddEventHandler if you put getLocalPlayer() the function will be executed only when local player join the server (so it will be executed once) if you put getRootElement() the function will be executed everytime anobody join the server -
nice idea karlis but im not sure which one is better (for speed of the script), - storing one integer variable (takes a bit of memory), - or checking table size every add (takes a bit of CPU) table.insert isn't good idea for me, as after that i will need to get insert key, so again, checking the table size, etc, which will result in longer script
-
https://forum.multitheftauto.com/viewtop ... 04&t=26979 https://forum.multitheftauto.com/viewtop ... 04&t=26662 https://forum.multitheftauto.com/viewtop ... 04&t=26445 and so on... search next time.. no need for login.. this feature is disabled right now
-
theoretically no, in practice, spawning some vehicles (via https://wiki.multitheftauto.com/wiki/Vehicle_IDs ) can do it (trains). but you can find/create an application that will restart server on crash. anyway, i've never got a server crash (my server is up from 31 December 2009) i don't understand your question.. -- clientside script function onDamageHandler(attacker, weapon, bodypart, loss) -- so now >> attacker << is the Hitting player -- and >> source << is the Hit victim end addEventHandler("onClientPedDamage", getRootElement(), onDamageHandler) of course!
