Jump to content

xF_Micka

Members
  • Posts

    88
  • Joined

  • Last visited

Everything posted by xF_Micka

  1. Hi. I have found a good speedometer on a server, here are the code extract from the client : --[[ @author: William DA SILVA @date: 12/08/2013 @website: [url=http://www.william-da-silva.net/]http://www.william-da-silva.net/[/url] @twitter: @willia_am @skype: willia_am @licence: DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <[email protected]> Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. You just DO WHAT THE FUCK YOU WANT TO. ]] screenX, screenY = guiGetScreenSize(); Speed = {} function onClientResourceStart(resource) function Speed.render() if getLocalPlayer() then if isElement(localPlayer) then if isPedInVehicle(localPlayer) then local speed = getElementSpeed(getPedOccupiedVehicle(localPlayer), "kmh") if speed then -- RED --dxDrawRectangle((1*screenX)-(1*screenX), 0.89*screenY, 63.9, 0.03*screenY, tocolor(255, 64, 64, 255)) -- GREY --dxDrawRectangle((1*screenX)-(1*screenX), 0.89*screenY, 0.030*screenX, 0.03*screenY, tocolor(58, 58, 58, 255)) -- FPS --dxDrawText(FPSCalc.."",(1*screenX)-0.99*screenX, 0.89*screenY+(dxGetFontHeight(0.9, "default")/4), 5, 0.03*screenY, tocolor(255, 255, 255, 255), screenX*0.0008, "default") -- Blue dxDrawRectangle((1*screenX)-(1*screenX), 0.93*screenY, (0.065*screenX), (0.03*screenY), tocolor(32, 146, 234, 255)) -- Grey dxDrawRectangle((1*screenX)-(1*screenX), 0.93*screenY, (0.06*screenX), (0.03*screenY), tocolor(58, 58, 58, 255)) -- Speed if(speed <= 90) then dxDrawText(tostring(speed).." km/h", (1*screenX)-(0.99*screenX), (0.93*screenY)+(dxGetFontHeight(0.9, "default")/4), 5, 0.03*screenY,tocolor(118 ,238, 0, 255), screenX*0.0008, "default") end if(speed <= 120 and speed > 90) then dxDrawText(tostring(speed).." km/h", (1*screenX)-(0.99*screenX), (0.93*screenY)+(dxGetFontHeight(0.9, "default")/4), 5, 0.03*screenY,tocolor(255 ,127 , 36, 255), screenX*0.0008, "default") end if(speed > 120) then dxDrawText(tostring(speed).." km/h", (1*screenX)-(0.99*screenX), (0.93*screenY)+(dxGetFontHeight(0.9, "default")/4), 5, 0.03*screenY,tocolor(255 ,64 ,64 ,255), screenX*0.0008, "default") end end end end end end function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 100) else return math.floor((x^2 + y^2 + z^2) ^ 0.5 * 1.8 * 100) end else return false end end --[[ Events ]]-- addEventHandler("onClientRender", getRootElement(), Speed.render) end addEventHandler ( "onClientResourceStart", getRootElement (), onClientResourceStart ) What script is it plz ?
  2. Salut Citizen. En faite oui c'est plutôt des textures et autres changements graphiques que je cherche à modifier, notamment le HUD, le radar, etc.
  3. Bonjour à tous. Je me lance dans la création d'un serveur MTA:SA où ce sera du DD/DM/Fun, donc en amont pas mal de configuration à faire, des scripts à mettre en place pour adapter le plus possible le serveur au DD/DM. Ma question est : peut-on télécharger des gamemode race modifiés (images/textures, etc.) ? Et adaptés au DD/DM de préférence ? Sur le forum et le site j'ai trouvé que des téléchargements de map & ressources mais pas trop de gamemode. Merci.
  4. Bonsoir à tous, Je dispose d'un clavier de jeu de chez Logitech, le G19, je voudrais l'exploiter pleinement avec MTA:SA, notamment en ce qui concerne les binds. Sur ce clavier je dispose de douze touches "G" programmables, de ce fait cela m'évite d'utiliser des touches traditionnels du clavier qui pourraient servir pour créer de nouvelles binds. Cependant voilà, je crois que MTA:SA ne me reconnait pas ces touches, voici un screen sur lequel je m'appuie pour m'expliquer : http://mondenews.free.fr/upload2/upload ... 929939.png Je voudrais configurer une des douze touches G programmables pour la commande "roll" par exemple, qui pour l'instant est associée à la touche W. Pour info, mon clavier ressemble à ça (avec les touches G programmables à gauche) : Merci par avance!
  5. Have you successful created a destruction derby server ?
  6. This changes nothing for me there and respawn checkpoint or not
  7. Hi, Everything is in the title. How have this game mode in the settings of the server?
  8. (sorry for my bad english, i'm french) Hi, When I have got a server on MTA: SA Race, I created a good number of maps. I would like, however, use it for a server on MTA: SA (new version, 1.0.3). How adapting them? Thank you.
  9. Hi, I have install your script but when i type "!commands admin" "or !commands player" they are nothing... Where the "slrgamecommands.ini" must take place ?
  10. Hi, I have install your script but when i type "!commands admin" "or !commands player" they are nothing... Where the "slrgamecommands.ini" must take place ?
  11. Nice work Scooby, but how to assure that when I type "!adminoff" it appears: Current Admins: None ?? THX
  12. Hi all, Due to too many abuses with "!admin" that cheateurs use with the command to detect an admin or not and come back when there are no admin online I would like to set up two commands, one that is "!onadmin" and another "!offadmin", "!onadmin" enable and display admins online, on the other command "!offadmin" not display admins online, hence the phrase defined when there is no admin logged will be used Thank you (Sorry if the english is bad, i use a translate because my english is not perfect)
  13. Don't work. Here here my integral part of the code : alias prs.dmcheck { var %b = $prs.dmcount($1) if ($prs.players($1) > 1) { var %a = $calc($prs.players($1) - %b) !hadd prsrank $mta.nick($1,$2) $calc($prs.points($1,$2) + %a) if (%a > 0) mta.pm $1 $2 %a $iif(%a == 1,Point,Points) Earned. Total: $prs.points($1,$2) } if (%b == 1) { var %a = 0 while (%a < %loop) { if ($hget(prstemp,alive $+ %a) == yes) { !.signal prs.endrace $1 %a !hdel prstemp alive $+ %a !hadd prsdmwins $replace($mta.race($1),$chr(32),$chr(45)) $+ $mta.nick($1,%a) $calc($prs.dmwins($1,%a) + 1) !hadd prsdmwins total $+ $mta.nick($1,%a) $calc($prs.totaldmwins($1,%a) + 1) !hadd prsrank $mta.nick($1,%a) $calc($prs.points($1,%a) + $prs.players($1)) mta.freeze $1 $4 <================= HERE FOR FREEZE mta.text $1 The Winner Is: $mta.nick($1,%a) mta.text $1 Won $prs.dmwins($1,%a) Out Of $prs.mapstarts($1,%a) $iif($prs.mapstarts($1,%a) == 1,Time,Times) } !inc %a } } }
  14. Don't work mta.freeze $1 $4 mta.text $1 The Winner Is: $mta.nick($1,%a) mta.text $1 Won $prs.dmwins($1,%a) Out Of $prs.mapstarts($1,%a) $iif($prs.mapstarts($1,%a) == 1,Time,Times)
  15. Your script improves high-speed, the system of temporary ban us very useful, congratulations to you, I hope that you are going to continue the development, it's worth it and you supported my!
×
×
  • Create New...