Jump to content

denny199

Members
  • Posts

    877
  • Joined

  • Last visited

Everything posted by denny199

  1. Allright, testing it now: Thanks, it's working.
  2. I mean with; "isn't only for the client" That everyone his/her gamespeed is set to for example: 0,3. And how should I 'container' it? like this?: hittype = getElementType( hitElement ) if (hittype == player ) then
  3. where's the function? where is theVehicle defined? edit: Or do this? if (getVehicleType(theVehicle) == "Bike" or getVehicleType(theVehicle) == "Boat" or getVehicleType(theVehicle) == "BMX" or getVehicleType(theVehicle) == "Quad") then outputChatBox ("works!! fap fap fap") end And then * fap fap fap fap fap *
  4. Hey there, I was just scripting arround for a map, but then I've found out that setGameSpeed isn't only for the client on client-side my code: marker1 = createMarker ( 4931.61621, -2618.78564, 7.33527, "cylinder", 1.5, 255, 255, 0, 0 ) container1 = createObject ( 2934,4920.2998046875,-2569.6999511719,23,0,0,0 ) function container () moveObject(container1, 1000, 4920.299, -2569.699, 7.5, 0, 0, 0 ) setTimer (createExplosion, 1000,4, 4920.299, -2569.699, 7.5, 4 ) setGameSpeed(0.4) setTimer ( setGameSpeed, 2000, 1, 1) end addEventHandler ( "onClientMarkerHit", marker1, container ) meta.xml <meta> <script src="client.lua" type="client"></script> </meta> Regards, Danny
  5. I think you've got some wrong calculations carHealth = getElementHealth(vehicle)/10; must be carHealth = getElementHealth(vehicle)/10 - 10 Will return when burning 0.7867876..blabla but the bar isn't synced then. Just lol arround with it.
  6. [2012-10-20 12:17:42] ERROR: Couldn't find script gui.lua for resource testmode [2012-10-20 12:17:42] Loading of resource 'testmode' failed
  7. Did you started the resource? f8>typ: start resourcename
  8. Do you have your'e own font? or do you want to import a mta's default font?
  9. In: your'e installedmtafolder/server/mods/deatmatch/resources
  10. That wil not work xiti, dxDrawText needs the eventhandler onClientRender.
  11. denny199

    playergroup

    Well, are you using a gangsystem or something? or do you mean on name like [DenR]
  12. denny199

    playergroup

    what do you mean with: "group" ?
  13. It's a shader: take a look here: https://wiki.multitheftauto.com/wiki/Shader_examples
  14. That code is totally wrong. Maybe is this usefull: https://community.multitheftauto.com/index.php?p=resources&s=details&id=3090
  15. use onVehicleStartEnter instead of onVehicleEnter so:
  16. Techial chek the function abc, it's [theplayer] and by getPlayerAccount [thePlayer] Use mine code, it's tested.
  17. I've edited the script. edit: here: function idk () local X, Y, Z = 0, 3, 4 abcvehicle = createVehicle ( 432, X, Y, Z + 10 ) addEventHandler("onVehicleEnter", abcvehicle, abc ) end addEventHandler ( "onResourceStart", resourceRoot, idk ) function abc ( thePlayer, seat, jacked ) local accname = getAccountName ( getPlayerAccount ( thePlayer ) ) if accname == "aliarman" then outputChatBox ("Welcome to your Car", thePlayer, 255,0,0,true) else cancelEvent() end end
  18. addEventHandler("onVehicleEnter", getRootElement(), abc ) getRootElement() = for all elements, use the vehicle element. so: function idk () local X, Y, Z = 0, 3, 4 abcvehicle = createVehicle ( 432, X, Y, Z + 10 ) addEventHandler("onVehicleEnter", abcvehicle, abc ) end addEventHandler ( "onResourceStart", resourceRoot, idk ) function abc ( thePlayer, seat, jacked ) local accname = getAccountName ( getPlayerAccount ( thePlayer ) ) if accname == "denny19" then outputChatBox ("Welcome to your Car", thePlayer, 255,0,0,true) else cancelEvent() end end Tested
  19. http://www.fear.fm/radio/player
  20. just edit function startImageDownload( playerToReceive ) edit: function startImageDownload( playerToReceive ) fetchRemote ( "http://www.example.com/image.jpg", myCallback, "", false, getRootElement() ) end addEventHandkler ( "onResourceStart", resourceRoot, startImageDownload) function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( getRootElement(), "onClientGotImage", resourceRoot, responseData ) end end
  21. YES IT CAN fetchRemote https://wiki.multitheftauto.com/wiki/FetchRemote
  22. Hey there, I'm busy with my new project, but now I'm stuck with one thing. I need to chek something if it's an number or not. Is there a function out there that will do it? Or do I need to work with string.find ? Or maybe a table with only numbers and then loop through it? Regards -Denny
×
×
  • Create New...