-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
I don't know if you are just kidding here, but this isn't even worth five bucks.
-
Any errors on debugscript?
-
if (source == botTable[Girl]) then Where is 'Girl' defined? Also, try adding this before addEventHandler: addEvent ( "onBotWasted", true )
-
The problem seems to be with triggerEvent, this code worked for me: addEventHandler ( "onPlayerDamage", getRootElement(), function ( attacker, weapon, bodypart, loss ) if ( bodypart == 9 and weapon == 34 ) then killPed ( source, attacker, weapon, bodypart ) end end )
-
Are you sure you copied it right? and that you don't have another script causing it?
-
local lastDamaged = 0 -- Define variable with default value '0' addEventHandler ( "onClientPlayerDamage", localPlayer, function ( ) lastDamaged = getTickCount ( ) -- Update the variable using getTickCount, which returns an integer containing the number of milliseconds since the system the server is running on started. end ) setTimer ( function ( ) if ( ( getTickCount ( ) - lastDamaged ) >= 5000 ) then -- If 5 seconds passed since last time the player got damaged.. setElementHealth ( localPlayer, ( getElementHealth ( localPlayer ) + 15 ) ) -- Increase the player health by 15% end end ,5000, 0 )
-
addEvent "onPlayerHeadshot" addEventHandler ( "onPlayerDamage", getRootElement(), function ( attacker, weapon, bodypart, loss ) if ( bodypart == 9 and weapon == 34 ) then -- If the bodypart is the head and the weapon is the sniper.. local result = triggerEvent ( "onPlayerHeadshot", source, attacker, weapon, loss ) if ( result == true ) then killPed ( source, attacker, weapon, bodypart ) end end end )
-
[Paying] Someone get my mta:dayz gamemode to work on 1.4 mta
Castillo replied to [SG]Santeri's topic in Scripting
I added you on skype, if it's not too hard, I do it for free. Edit: Forget it, I been told you're using a pirated version of DayZ. -
Pero con está animación no podes caminar.
-
For what I can see, you are mixing client and server side functions, that will never work.
-
That's because you put it to only draw one of them depending on the speed. local sw, sh = guiGetScreenSize ( ) function reddotTest ( ) local theVehicle = getPedOccupiedVehicle ( localPlayer ) if ( theVehicle ) then local speedx, speedy, speedz = getElementVelocity ( theVehicle ) local actualspeed = ( speedx ^ 2 + speedy ^ 2 + speedz ^ 2 ) ^ ( 0.5 ) local kmh = ( actualspeed * 180 ) dxDrawImage ( sw / 2, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.80, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.60, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.40, sh / 2, 32, 32, "files/blackdot.png" ) dxDrawImage ( sw / 1.20, sh / 2, 32, 32, "files/blackdot.png" ) --dxDrawImage(sw/2,sh/2,32,32,"files/reddot.png") dxDrawText ( math.floor ( kmh + 0.5 ) .. " km/h", sw / 2, sh / 1.80, sw / 2, sh / 1.80, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) if ( kmh > 50 ) then dxDrawImage ( sw / 2, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "50 or more" ) end if ( kmh >= 100 ) then dxDrawImage ( sw / 1.80, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "100 or more" ) end if ( kmh >= 150 ) then dxDrawImage ( sw / 1.60, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "150 or more" ) end if ( kmh >= 200 ) then dxDrawImage ( sw / 1.40, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "200 or more" ) end if ( kmh >= 250 ) then dxDrawImage ( sw / 1.20, sh / 2, 32, 32, "files/reddot.png" ) outputChatBox ( "250 or more" ) end end end Try it.
-
You mean that when you are going 100 KMH/MPH, it should draw the image from 50 KMH/MPH aswell?
-
You have a problem with the ACL.xml, post it here.
-
You could define a variable which would contain the last time you got damaged. You can do this using onClientPlayerDamage and getTickCount.
-
Estas seguro? intente poner una animacion y luego usar setControlState para que camine y no funciona.
-
Yo lo probe y no me da ningun error.
-
1: Si no me equivoco, no hay manera. 2: No se pueden poner animaciones personalizadas.
-
Tenes que crear tu propia funcion de getPlayerFromName. https://wiki.multitheftauto.com/wiki/Ge ... omNamePart Proba esa, acordate de copiar el codigo de la fucion, ya que no es nativa del MTA.
-
We don't give support with leaked scripts. Topic locked.
-
I think you didn't really understand what is this about. Is not a resource, is the implementation of browser functions into MTA.
