Jump to content

Fabio(GNR)

Members
  • Posts

    210
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Fabio(GNR)'s Achievements

Chump

Chump (17/54)

0

Reputation

  1. Got the same issue, definitely related to player connect/join.
  2. Which one? FabienWang's? It didn't show errors for me and lacked a few features I would like to have, also, I just wanted to create something in C#.
  3. Correct! However, it's a lot easier to use.
  4. As title said, a Lua compiler! Basic C# project of mine, compiles files or entire resources. Features: General If there is an error during compiling it will be detected and shown to you Option to update meta.xml with new path Option to only update/compile clientside files Specify which file extension the new file should have Option to prompt before overwriting Option to keep items in the list for regular use Option to set default directory for files/resources Settings save in between sessions Launch the portable program from anywhere, it will create the necessary files itself Files Select one or more files Looks for a meta.xml 10 directories up Resources Scans the meta.xml for related files Uses Lua's official luac.exe [credit to http://www.lua.org/ - http://www.lua.org/license.html] File is included within program. Download Virus scan
  5. GUIEditor.staticimage[1] = guiCreateStaticImage(187, 59, 64, 64, "images/UNKNOWN.png", false, GUIEditor.tab[1]) my guess is that that fails, make sure the image exists and is noted in meta.xml
  6. No idea where I had to put this anyway, I do "restart theResource" in console and client crashes. Only happen sometimes, server does not crash and other clients also do not crash. I have a .dmp file: https://www.dropbox.com/s/s37guqyxzwq9n0u/client_1.4-unstable-4091.0.000_gtasa_003c759a_5_DGM_0BB2A8C0_55F3_FFF_8C0D6_20120512_2310.dmp using the newest 1.4n: 4091. On resource stop I save 2 xml files client side, set some account data from elementData server. On start I load 2 xml files and set elementData from accountData. I would like to know why this occurs and if it is the resource it's fault or MTA.
  7. That must be it, Slothman. Jaysd1, it's not my script because it does return material etc.
  8. I have tried in two scripts, one with firing a projectile which succesfully retrieved material id but not worldModelID. Also in this script: addCommandHandler("removeObject", function (playerSource) showCursor(true) addEventHandler("onClientClick", getRootElement(), clickRemoveObject) end ) function clickRemoveObject(button, state, x, y) local cx,cy,cz = getCameraMatrix() wx, wy, wz = getWorldFromScreenPosition(x,y, 1000) hit, hX, hY, hZ, hitEl, nX, nY, nZ, mat, light, piece, ModelID, ModelPosX, ModelPosY, ModelPosZ = processLineOfSight(cx,cy,cz,wx,wy,wz, true, false ,false, false, true, true, true, true, nil, true ) removeWorldModel ( ModelID, 50, ModelPosX, ModelPosY, ModelPosZ ) setCameraMatrix( ModelPosX, ModelPosY, ModelPosZ + 500 ) setTimer(setCameraTarget, 100, 1, localPlayer) end worldModelID = nil, and the ModelPos too.
  9. I tried something like that but it didn't work. That probably does, although that problem is somewhat solved i really want to know why the ped's don't die. Thanks though! EDIT: The ped's didnt die because i spawned them at 0,0,0 then warped them to a vehicle far away. Which caused them to be desynced. But now the ped's die but the car's keep exploding, sort of. The onVehicleExlode doesn't get called after once though.
  10. Thanks, problem is now: I found out that the Ped's do die when not being warped. When they get warped to their vehicle to cant be killed anymore. The vehicle can be blown when not occupied, the ped's can be killed when they are not in vehicle. But if i warp them, they get invincible. function convoy( number ) if number == 1 then car1 = createVehicle(470, 1839.328125,281.9150390625,23.716369628906,0,0,94.788726806641) car2 = createVehicle(433, 1810.673828125,278.4248046875,21.178592681885,0,0,94.865631103516) car3 = createVehicle(470, 1777.3564453125,276.9091796875,19.094444274902,0,0,86.532409667969) ped1 = createPed(287, 0,0,3,0,0,0, true) ped2 = createPed(287, 1,1,4,0,0,0, true) ped3 = createPed(287, 2,2,3,0,0,0, true) triggerClientEvent(source,"createBlips", source, car1, car2, car3, ped1, ped2, ped3 ) setTimer(warpPeds, 500,1,car1,car2,car3,ped1,ped2,ped3) elseif number == 2 then else outputChatBox("Error...") end end function warpPeds(car1,car2,car3,ped1,ped2,ped3) warp1 = warpPedIntoVehicle(ped1,car1) warp2 = warpPedIntoVehicle(ped3,car3) warp3 = warpPedIntoVehicle(ped2,car2) setVehicleDamageProof(car1,false) setVehicleDamageProof(car2,false) setVehicleDamageProof(car3,false) end Why?!
  11. Will try that, i will look around for those but i dont think i have any canceling scrips unless it's enabled by default. EDIT: Oh misread you but yeah that is what i meant, maybe there is a other solution: I create my ped's server side and warp them into a vehicle. Then i send a clientevent which creates blips for the peds and creates a onClientRender for dxDrawText. But, i want it to draw only when the ped is alive. Any idea? Also, if you create a blip on a ped will it be deleted when it dies? EDIT2: Something is very wrong , i did stopall then started runcode which also started ajax, i do run ped = createPed(287,1,1,1) But it can't be damaged... Peds do die now, i changed some things and something prevented them from getting damaged.
  12. First, my ped's won't die. I spawn a car, spawn a ped, warp ped in vehicle, bind a blip to it. When i shoot the vehicle it just stays in flames explodes and stays in flames unlimited. Why are my ped's invulnerable? Server Side: function convoy( number) if number == 1 then car1 = createVehicle(470, 1839.328125,281.9150390625,23.716369628906,0,0,94.788726806641) car2 = createVehicle(433, 1810.673828125,278.4248046875,21.178592681885,0,0,94.865631103516) car3 = createVehicle(470, 1777.3564453125,276.9091796875,19.094444274902,0,0,86.532409667969) ped1 = createPed(287, 0,0,0,0,0,0, true) ped2 = createPed(287, 1,1,1,0,0,0, true) ped3 = createPed(287, 2,2,2,0,0,0, true) setTimer(warpPeds,250,1) triggerClientEvent(source,"createBlips", source, car1, car2, car3, ped1, ped2, ped3 ) elseif number == 2 then else outputChatBox("Error...") end end function warpPeds() warpPedIntoVehicle(ped1,car1) warpPedIntoVehicle(ped3,car3) warpPedIntoVehicle(ped2,car2) end How they are created, then client-side: function createTheBlips(car1,car2,car3,ped1,ped2,ped3) blipPed1 = createBlipAttachedTo(ped1,0,4) blipPed2 = createBlipAttachedTo(ped2,0,4) blipPed3 = createBlipAttachedTo(ped3,0,4) addEventHandler("onClientRender", getRootElement(), function() triggerEvent("drawStatusEvent",localPlayer,ped1,ped2,ped3) end) end Then to my next question, i have function which creates a eventhandler on "onClientRender", but it has to pass arguements to a other function. Function 1: Has the good arguements, has the eventhandler. Function 2: gets triggered every render, doesn't have arguements but needs it.
  13. So i call a server event from clientside, but it repeats endless. Idk why. This is what calls it: Client Side function vehCreate() if guiGetVisible(grid_cars) == true then selectedGrid = grid_cars elseif guiGetVisible(grid_bikes) == true then selectedGrid = grid_bikes elseif guiGetVisible(grid_air) == true then selectedGrid = grid_air elseif guiGetVisible(grid_misc) == true then selectedGrid = grid_misc end if source == button_vehicle_create_warp then warp = true elseif source == button_vehicle_create then warp = false end selectedVeh1, selectedVeh2 = guiGridListGetSelectedItem(selectedGrid) if selectedVeh1 ~= -1 then textItem = guiGridListGetItemText(selectedGrid,selectedVeh1,selectedVeh2) modelVehID = getVehicleModelFromName(textItem) if not modelVehID then dataItem = guiGridListGetItemData(selectedGrid, selectedVeh1,selectedVeh2) if not dataItem then outputChatBox("Can't retrieve data and name isn't good") else triggerServerEvent("giveVehicle",localPlayer, dataItem, warp) end else triggerServerEvent("giveVehicle",localPlayer, modelVehID, warp) end end end Server : addEvent("giveVehicle",true) function createVehicle(vehID,warp) name = getPlayerName(source) outputChatBox("i Am " .. name .. ".") x, y, z = getElementPosition(source) local rx, ry, rz = getElementRotation(source) local veh = createVehicle(vehID,x,y,z+1,rx,ry,rz) if warp == true then warpPedIntoVehicle(source,veh,0) else setElementPosition(source,x,y,z+3) end end addEventHandler("giveVehicle", getRootElement(), createVehicle) Solved, had my function named createVehicle, which created the loop. Topic can be closed.
×
×
  • Create New...