Hell-Mate
Members-
Posts
198 -
Joined
-
Last visited
Everything posted by Hell-Mate
-
The wheel turned when exiting the car as MTA script?
Hell-Mate replied to MrGTAmodsgerman's topic in Scripting
i understood nothing from what you said. btw this forum is for helping in script not to request codes.. Regards ,, -
Hello community,, i want help in something, well, i want to make an event onPlayerWasted and get who killed the WastedPlayer so i can givehimMoney or what ever i just need this help because im creating a hit system .. function hitme ( thePlayer, commandName, moneyAmount ) local playermoney = getPlayerMoney ( thePlayer ) if playermoney < tonumber(moneyAmount) then outputChatBox ( "You dont have enough money to make hit",thePlayer,255,0,0, false ) cancelEvent () else amount = tonumber(moneyAmount) if amount > 500000 then outputChatBox ( "Maximum hit amount is $500000", thePlayer,255,0,0, false ) cancelEvent () else if amount < 50000 then outputChatBox ( "Minimum hit amount is $50000", thePlayer,255,0,0, false ) cancelEvent () else if ( getElementData ( thePlayer, 'Player' ) == 'Hit' ) then outputChatBox ( "You are already a hit", thePlayer,255,0,0, false ) cancelEvent () else local playername = getPlayerName ( thePlayer ) hitBlip = createBlipAttachedTo ( thePlayer, 26 ) setPlayerNametagColor ( thePlayer, 0, 0, 0 ) takePlayerMoney ( thePlayer, amount ) setElementData ( thePlayer, 'Player', "Hit" ) outputChatBox ( "You have placed a $" .. amount .. " hit on your self",thePlayer,255,235,0, false ) outputChatBox ( "A hit has been placed on " .. playername .. " For $" .. amount .. ".",thePlayer,255,235,0, false ) end end end end end addCommandHandler ("hitme", hitme) function ondie () removeElementData( source, 'Player', "Hit" ) destroyElement ( hitBlip ) end addEventHandler ( "onPlayerWasted", getRootElement(), ondie ) i just wrote this code now but i still need to know how to get the killer of thePlayer to finish this Script. Thanks
-
Answer is : YES, you can find radar imgs at gta3.img use txd workshop to import the new images
-
to save things you have to use SQL
-
its not like this one .. this one is really simple .. my script is opening GUI when the mech enter to the driver ( seat == 0 ) to accept or deney the mech to fix the car and its taking money from the driver math.random and giving it to mech and some cool stuffs like fading cam and +Z car pos .. its not like the one on community
-
big thanks and best regards to you myonlake, you really helped me thanks, got it 100%.
-
im not asking about this .. im asking about loop thingy, i just know this function ( getElementsbyType ) and know this hash thingy. and thx anyway
-
can you explain me easier way ? well, consider that you are learning a child. btw my english is not professional so try to use an easier words to make it more easier to me to understand @myonlake
-
big thx to you myonlake for your effort. i think i got it 50%, can you explain what loop do or why the loop is needed in this script ? addEventHandler( "onClientRender", root, function( ) local peds = getElementsByType("ped") if (#peds > 0) then local x,y,z = getElementPosition(localPlayer) for k,ped in ipairs(peds) do if (getElementData(ped, "robberped")) then local pX,pY,pZ = getElementPosition(ped) --ped's position local tX,tY,tZ = pX,pY,pZ+1 --text's position local maxDistance = 30 local distance = getDistanceBetweenPoints3D(x, y, z, tX, tY, tZ) if (distance <= maxDistance) then local wX, wY = getScreenFromWorldPosition(tX, tY, tZ) if (wX and wY) then dxDrawText("Robber Job", wX + 2, wY + 2, _, _, tocolor(0, 0, 0, 200), 2, "arial", "center", "center") dxDrawText("Robber Job", wX, wY, _, _, tocolor(0, 255, 0, 200), 2, "arial", "center", "center") end end end end end end )
-
Well i didnt understand, can you give me an example ? and put a note for every line ? --note
-
Hellp community,, i just heared alot about this loop thingy. i want anyone to tell me what is it and where it can be used and why .. Thanks Regards,,
-
dude, when i was in school i always fail in math dont lemme remember these fuc**n days
-
Thanks myonlake, no problem with the normal marker. no need to :O my mind and learn some new mathematical calculations and trigonometric functions. so i will use the normal marker
-
the problem is the outputChatBox, well use this > ("No player has been found with the ID " .. id ) this " is the problem . hope i helped.
-
Never mind, problem is solved and all is okay now, #Lock-Request
-
Never used such a function, any example ? or tell me how to create such a marker like on the pic with this function ?
-
myonlake, im not the owner of the topic but your example really makes it very clear, thanks
-
No no. its not working like that because when im far a bit from the marker i see the normal one but when im near i see the one like on the pic ( getDistanceBetweenPoints3D ). i think i can change marker object with txd workshop ?
-
This function returns amount of time that your system has been running in milliseconds. By comparing two values of getTickCount, you can determine how much time has passed (in milliseconds) between two events. This could be used to determine how efficient your code is, or to time how long a player takes to complete a task. #Wiki
-
okay, here is a pic > or http://i.imgur.com/WAOXvKt.jpg
-
it do just the same what any marker do, but the difference is just how it look like. i mean another image + another shape
-
i didnt understand what your script should do ?? what you wrote is just doing a marker to ( thePlayer ) and setting him frozen nothing more nor less ..
-
you have to use dxDrawTexture and dxDrawImage .. for more information about them Click here
-
Hello community ,, I just saw CIT server marker and i would like to know how to create on like this instead of the normal marker. any one can help ?
-
ik its a basic script but its not on community. thats why i decided to sell it
