-
Posts
283 -
Joined
-
Last visited
Everything posted by Buffalo
-
Yes, but bare in mind that if a coordinate is negative it will get inversed
-
I think setting rotation instantly works only from 1.1, as it doesn't work on 1.0 for me too.
-
Proceed to getElementMatrix() There is fine examples of what you need. Only for peds and vehicles. And if in case you need to do it serverside function getPositionInFront(element,meters) local x, y, z = getElementPosition ( element ) local a,b,r = getVehicleRotation ( element ) x = x - math.sin ( math.rad(r) ) * meters y = y + math.cos ( math.rad(r) ) * meters return x,y,z end
-
In the worst case try getElementData(element,'rotZ')
-
local gtarget function guiTargetInformation(target) if (target) then if gtarget and gtarget ~= target then removeEventHandler('onClientPlayerDamage',gtarget,updateMyTarget) end addEventHandler('onClientPlayerDamage',target,updateMyTarget) guiSetText(targetHealth, "Health:"..getElementHealth(target)) guiSetVisible(targetWindow, true) else if gtarget then removeEventHandler('onClientPlayerDamage',gtarget,updateMyTarget) gtarget = nil end killTimer(updateTimer) guiSetVisible(targetWindow, false) end end) function updateMyTarget() guiSetText(targetHealth, "Health:"..getElementHealth(source)) end
-
Your player element is described in this function as source, and therefore the function you attached to setTimer will read it as nil as it is different function, so you have to provide 'source' argument for setTimer. Just try to replace that setTimer line with yours, it should work. Another example: setTimer(function(player) if(isElementWithinMarker(player,passagem1)) then setElementPosition(player,x2,y2,z2 +1) end end, 50,1,source)--we provide source as argument
-
You have set a timer. Provide source within calling it, so player element won't be lost setTimer(function(source) if(isElementWithinMarker(source,passagem1)) then setElementPosition(source,x2,y2,z2 +1) end end, 50,1,source)
-
Add timer like updateTimer = setTimer(updateMyTarget,500,0) -- into onClientPlayerTarget function updateMyTarget() local mytarget = getPedTarget(getLocalPlayer()) if myTarget then --getElementHealth and other stuff to update else killTimer(updateTimer) updateTimer = nil end end Even another more efficient method is to add 'onClientPlayerDamage' event, if you need to update only health: addEventHandler('onClientPlayerDamage',target,updateMyTarget) and of course remove it when target is false removeEventHandler('onClientPlayerDamage',target,updateMyTarget) then the function would be function updateMyTarget() --getElementHealth(source) and other stuff to update end
-
Yeah, me too,you never know when mta will stun you.
-
These shader functions are quite new, i'd rather wait until ccw made some more error-explaining output. There will be more tutorials on it, but not now.
-
Store all those objects that were created during the time in table and set an infinite 'timesToExecute' timer to store them into XML at specified intervals or when it is required. Or do you require a 'save-to-xml' code?
-
The only way is to manually find or use notepad++ to search keywords or onPlayerKillMessage or onClientPlayerKillMessage and delete/comment out those lines (of course not in killmessages itself, but in other resources, that could ouput these errors). Also have a look over mtaserver.conf and at the end of this file there should not be added resource killmessages, if it is, delete the line.
-
Other resources may require it, so if they can't find it running, they would print error messages.
-
Use bindKey with mouse_wheel_up mouse_wheel_down
-
i would do something like for i,aName in pairs(achs)do local row = guiGridListAddRow ( achGrid ) guiGridListSetItemText ( achGrid, row, 1, aName, false, false ) if (getAccountData(player,"Achievement: "..aName) == false ) then -- its locked? guiGridListSetItemText ( achGrid, row, 2, 'Locked', false, false ) else guiGridListSetItemText ( achGrid, row, 2, 'Unlocked', false, false ) end end So there would be less overload, as it sets lock once and then theres no need for 2nd loop
-
well then seems we have to be patient .. yarrrrr .
-
and I take it you know well HLSL be waitin' for a resource from yer or a proof of this possibility so far i did not manage to make any of shader functions work properly but it will be amazing
-
Since only certain IDS cause crashes, the function should be re-enabled disabling only those IDS, but not the whole function? As of https://wiki.multitheftauto.com/wiki/SetPedWalkingStyle function is quite interesting.
-
Tai čia tik tau taip būna
-
Tj skype gi turi, jei nesu prisijungęs tj ir nėr manęs prie pc Beto paieškok gi tame problemų skyriuj.. taip ar taip ten visus atsakymus randu neeeeeeeeeeeeeeee ! tu tooooks neteisus ! prove it! žiūrėk per kelias dienas atsirado kiek postų
-
Nerodykit savo intelektualumo koeficiento lygio scottai su pwneriu! Čia rimtas forumas rimtiem bičam
-
It's very simple to get it centered: local sx,sy = guiGetScreenSize() --get player's current resolution dxDrawText('Text',sx/2-70,sy/2-20,sx/2+70,sy/2+20,tocolor(255,170,0,255),1.0,'bankgothic','center','center') -- draw text in the center according to resolution
-
Turi omeny Shhit Amazing Multi Pack ?
-
Just use following events: onClientMouseEnter onClientMouseLeave
-
Always search before asking - https://forum.multitheftauto.com/viewtopic.php?f=91&t=31829&p=338020&hilit=rgb+hex#p338020 (fourth post if i understood you correctly)
