• Content Count

  • Joined

  • Last visited

Everything posted by _DrXenon

  1. He wants it to play with his friends, not for money & not for power .-. What so bad? I think Its pretty cool to have the server that you exactly want. And if you liked it and enjoyed it I am pretty sure you will want to make it bigger n bigger with time, and I believe it would grow because the main reason and purpose of it was for fun not for anything else.
  2. Maybe freeze top 20 servers on its places? So If a player sorted the list differently the top 20 will still be at the top.
  3. _DrXenon

    dbConnect help

    He is using a script he didn't create. He doesn't know how to use it. He asked a dumb question. He expected that everyone will understand what he said while what he said is only understandable if only you know what is NGSQL. If you really created NGSQL script which belongs to NG community then you would have known what you gotta do to fix your problem. I don't recommend helping this guy.
  4. First of all, the second argument in outputChatBox 'myPlayer' isn't valid and not defined anywhere in the timer 'Timer'. Also, onPlayerVehicleEnter first parameter is the vehicle being entered and not the VehicleID. So no need for 'getPedOccupiedVehicle' to get the vehicle element. Even using it this way wouldn't be correct I supose.
  5. Hmm that's wierd if it is true. If your problem is only with the lost data.. then just get the data before the attaching and give it back to it after the attaching I guess?
  6. Maybe try disabling collisions between the truck and the trailer? I think this will work. Maybe try it onTrailerAttach?
  7. What do you mean by 'destroyElement destorys in all dimensions'? If you created an item by a script it will only be created at one dimension (default dim: 0). Anyway, if you are rather talking about world objects (created by GTA Map) then just set a timer to check the players' dimension. If he is at a dimension where that model should be shown then restoreWorldModel for that certain player otherwise removeWorldModel. What I mean, the timer will check the dimension of the player, if the player is in the right dimension the script will remove the world model for that player and when he moves to another dimension the script will automatically restore the removed model according to his new dimension.
  8. _DrXenon

    [HELP] Markers

    If you add the job Military Airborne and alter the current Military job into Military Groundforce or anything else... it will be easy. You will set normal vehicles to ground units and planes to airborne unit. There is many other ways.. but this on is ez. If you dont wish to change Military name just say so amd I will give you another way.
  9. there is a useful function called findRotation. use it to find the rotation between the object and the ped. Then getPedRotation or getElementRotation to get the rotation of the ped. After that you will just need to decrease the small angle from the big angle. So if rotation between an object and ped is 350 and the ped's rotation is 180 then he has to turn 350-180= 170 degrees.
  10. So, I was trying to use toggleControl to disable fire with toggleControl("fire",false) (also used the server version of that) But the function doesn't work, there is no error/debug also. Did anyone encounter such problem? I suspect having a function that enables that controls automatically, like every second, but I am not sure if there is such function inside my scripts. Thats why I am asking, there might be another reason for toggleControl not to work on server/client?
  11. Hey I have recently made a script and to save its data and keep it safe in case script was restarted/server was shutdown I moved the data into a SQL using executeSQLQuery function. I believe such function saves the data in the internal DB right? Anyway, I did that in my local server and everything worked fine. But when I moved the script into another (hosted) server, An error showed up in the debug section saying 'Database query failed: file is encrypted or is not database'. I don't know what the heck they talking about, but I need help. Any ideas?
  12. _DrXenon

    Remaining Time

    An easy way, set the player's account data as 'vip' into true and at the same time set a timer to set the player's account data as 'vip' into false. This will only work properly if the resource doesn't get restarted (due to server restart or resource restart) so timers will still exist. Other way, which is simple and easy but harder than the first is to set the 'vip' data as a number which presents the time of seconds he has as a vip and set a timer to reduce the 'vip' data value by 1 every second, and whenever the value is higher than 0, the player can use the vip, no otherwise. (As long as the account data 'vip' doesn't get touched, this will work perfectly even when server crashs or something)
  13. _DrXenon

    Auto Respawn

    Just don't use executeCommandHandler and use addCommandHandler to work on your respawn function. We can't give further help since we don't know what you asking for and how does your function work and if it even exists. According to your replys I am starting to believe that you think that the command 'respawnall' which you used somewhere else other than in your server is some sort of global MTA hardcoded function which is not. To use that command, you should have a function that actually respawns, connected to the command you wish.
  14. I have not taken a look at your code but a very simple way to do this trick is by that; addEventHandler("onClientRender",root,function() if getElementData(localPlayer,"typing") == true then -- dxDraw..... -- anything else you want end end) -- now this way the image (if you are using image) or the text will be only showing when the player has the 'typing' data, otherwise nothing would be shown. -- all you have to do is to detect whenever a player is typing and whenever he is not and change his data according to that.
  15. _DrXenon

    Auto Respawn

    Idk what is that. But if dimos is true then, just define thePlayer through using addCommandHandler. (first parameter is the player that commanded.)
  16. @UnchiuDawg using the function engineApplyShaderToWorldTexture has an argument that allows you to change the texture of a particular object eith the shader without the need to replace the textures of all the other objects that share the same original texture. Anyway, I mentioned that just to let you know, eventho that might not help a lot since it is a lighting issue.
  17. The rectangle's alpha is set to 0. dxDrawRectangle3D (x, y, z+, width, hight, tocolor(255, 0, 0, 0)) change the tocolor arg into this; tocolor(255,0,0,255).
  18. Well, use one function and one var which will be the dx text's text and set a hundered timers which change the var value, that is easier I think. Something like that; local local var = "" addEvenHandler("...",root,function() dxDrawText(var,sx,sy,w,h...) end) setTimer(function() var = "One word" end,6000,1) -- you can make one timer too if u use tables, but since you dont use them just make a hundered timer.
  19. _DrXenon

    Spawn points

    Adding spawn points will be through adding more spawns in the main table. Could you present the way you add more spawns into the table so we can know if you doing it right?
  20. Stack overflaw because you called spawnVehicle function within your re-defined spawnVehicle function, this will cause the function to be called infinite times and cause a stack overflaw.
  21. Why not، this var determines the size doesn't. Gonna test it later anyway. Idk maybe u r right.
  22. local radius = 1 local MySphere = createColSphere(x,y,z,radius) -- make sure to replace x,y & z with numbers. function changeMySphereSize(size) radius = size end -- it is dump to create a whole function for that, but it can be useful if you want to fill in more arguments. -- other than that you can simply change 'radius' value. What do you mean? Why not?
  23. _DrXenon

    Vehicle Car

    -- something like that maybe. for i = 1, #Cars do local vehicle = Cars[i] local occupants = getVehicleOccupants(vehicle) if #occupants == 0 then destroyElement(vehicle) end end