-
Posts
965 -
Joined
-
Last visited
Everything posted by DakiLLa
-
I have tryed to do as you guys said, but same effect. Well nevermind, I have found a hacky solution: I create a little white arrow object over each checkpoint and set it look on the next one. Works fine. Thx for help anyway.
-
Hey guys Well, i have a question: is there any limit for checkpoint arrows? I have a table with 20 checkpoints in it and when i do setMarkerTarget on each checkpoint, then after the sixth checkpoint that target arrow is missing. Any ideas how to fix this? piece of code.. for i = 1, #checkpoints - 1 do setMarkerTarget( checkpoints[i], getElementPosition( checkpoints[i+1] ) ); end;
-
http://www.pagetutor.com/common/bgcolors1536.png I think thats enough for you
-
addEvent("onPlayerFinish",true) addEventHandler("onPlayerFinish",getRootElement(), function (rank,finishtime) if rank == 1 then givePlayerMoney(source,350) elseif rank == 2 then givePlayerMoney(source,100) elseif rank == 3 then givePlayerMoney(source,50) end end ) And you forgot about 'elseif'
-
Hmm, you must be in a car while login. Or you wanna change color of all existing vehicles on the server ?
-
I don't know what you mean by that question.. The script changes headlight colours randomly. like when a admin login it changes his car color to black for example, but when someone else login it dosen't changes his car to black. eh, something like addEventHandler( 'onPlayerLogin', root, function() local veh = getPedOccupiedVehicle( source ); if veh and isObjectInACLGroup( 'user.'..getPlayerName( source ), aclGetGroup( 'Admin' ) ) then setVehicleColor( veh, 0, 0, 0, 0 ); --color it with black end; end );
-
my friend suggested me to play with him in mta:vc, well.. my story in mta has started from that point.
-
try to put a timer, because functions that are attached to onResourceStart sometimes doesnt fire in this event immediately. I mean addEventHandler( "onResourceStart", getResourceRootElement(), function( ) setTimer( function() local resToStop = getResorceFromName( "mapmanager" ); if resToStop then stopResource( resToStop ); end end, 100, 1 ); end )
-
You can use stopResource function for that.
-
Hmm, is it really going to be changed in the near future? I wanna get fully working stats system that was missed since dp2.x times
-
Well, little typo, he wants that the name of player will be another color: outputChatBox('#E76A0C'..thePlayer..': #FAFAFA'..message,getRootElement(),0,0,0,true)
-
eh, i think it should be like function setPlayerChatColor(message) local thePlayer = getPlayerName(source) if thePlayer:find("TAG//") then cancelEvent() outputChatBox(thePlayer..': '..message,getRootElement(),231,106,12) end end addEventHandler( "onPlayerChat", getRootElement(), setPlayerChatColor )
-
setElementVelocity doesnt work with objects, but you can do a little trick: create any vehicle (for example, flower pot, ID 594) set its alpha to zero, set it to be damage proof and then attach your object to it. Then you just should to apply setElementVelocity on your vehicle. local pot = createVehicle( 594, 0, 0, 0 ) setElementAlpha( pot, 0 ) setVehicleDamageProof( pot, true ) local object = createObject( 1582, 0, 0, 0 ) attachElements( object, pot ) setElementVelocity( pot, 0, 0, 1.5 ) -- lets throw our object in air
-
playSound is a client-side function, but you have used it server-side, thats wrong. Use onClientPlayerWasted event instead of 'onPlayerWasted'. addEventHandler("onClientPlayerWasted", getLocalPlayer(), function() local sound = playSound("sounds/wasted.mp3") --Play Fix up look sharp-Dizzee Rascal.mp3 from the sounds folder setSoundVolume(sound, 0.5) -- set the sound volume to 50% end )
-
Well, he asked about 'onPlayerVehicleEnter' event, so i gave him an example with it
-
simple enough: truck = createVehicle( ... ) addEventHandler( 'onPlayerVehicleEnter', getRootElement(), function( theVehicle, seat ) if theVehicle == truck then --if variable 'truck' is the vehicle, that somebody has got in outputChatBox( 'You have got into the truck :D', source, 0, 255, 0 ) end end )
-
I guess, there is no any proper way to make a normal anti-cheat system, except of fully rewriting damage and gun shots...
-
And also it kicks you if you change your health inside this event :\
-
if you wanna fix this "bug", then you can use this resource.
-
lol, first time i seen him i thought that his nick is really means masters of hardcore, but ive failed
-
Hmm, about #1.. You can create a dxRectangle all over your screen and change it's alpha, so it will darker or lighter..
-
function getStringFromColor( R, G, B, A ) if R and G and B then return ('#%02x%02x%02x'):format(R, G, B, A or 255) else return false end end Found it in a pastebin archive.. Havent tryed this yet, but should works.