Jump to content

Dealman

Members
  • Posts

    1,421
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Dealman

  1. getAccount will return the account element, which is what you need to use in getAccountData - not a string. For example you could do this; function exampleCommand_Handler(thePlayer, theCMD, theTarget) local theData = getAccountData(getAccount(theTarget), "DataKey"); end addCommandHandler("GetAccPos", exampleCommand_Handler, false, false); Usage would be for example; /getaccposs account1
  2. Current Status: In Development, Closed Testing * People I deem helpful can, upon shown interest receive an invite to closed testing. Introduction What Does it Do? Current Features Planned Features Media - Screenshots Media - Videos Maps Needed! Thank you for taking your time to read and (possibly) showing interest. I would greatly appreciate any kind of feedback and criticism, suggestions and opinions are of course also welcome. Though try not to start a flame war, and respect other people's opinions! I'll be trying to update this as regularly as I can, and hopefully a public testing phase shouldn't be too far away! Dealman, Founder of Freaking Awesome Guys http://www.FreakingAwesomeGuys.co.uk
  3. Because you're not concatenating it properly. Read this article for more information regarding concatenation. addCommandHandler( "akina", function(player) setElementPosition(player, -2499.77466, 2135.24170, 320.54016) outputChatBox("#FF0000[#FF00FFakina#FF0000]"..getPlayerFromName(Player).."#FF00FFHave Joined #FF0000[#FF00FF/akina#FF0000]", getRootElement(), 255, 255, 255, true) end )
  4. Try this. If it still doesn't work, try commenting out the first if statement(also remember the end that closes it!). function blowOnCollisionWithModel_Handler(hitElement) if(source ~= getPedOccupiedVehicle(localPlayer)) then if(hitElement == 3458) then blowVehicle(source); end end end addEventHandler("onClientVehicleCollision", getRootElement(), blowOnCollisionWithModel_Handler);
  5. Try this and see what it outputs when you hit the model you want. function blowOnCollisionWithModel_Handler(hitElement) outputChatBox("You collided with Model: [#FF2626"..tostring(getElementModel(hitElement)).."#BB0000]", 187, 0, 0, true); end addEventHandler("onClientVehicleCollision", getRootElement(), blowOnCollisionWithModel_Handler); Do note that due to how onClientVehicleCollision works, chat may or may not be spammed with messages.
  6. You're creating a new image and putting it at front 30-60 times per second. Thus, it lags.
  7. I haven't tested it, but you could try this; function blowOnCollisionWithModel_Handler(hitElement) if(source ~= getPedOccupiedVehicle(localPlayer)) then if(getElementModel(hitElement) == 3458) then blowVehicle(source); end end end addEventHandler("onClientVehicleCollision", getRootElement(), blowOnCollisionWithModel_Handler);
  8. Haven't tried it but you could check if the file exists as they're disconnecting, if it does, delete it. It's not optimal since they can still get it while the server is running. You can also try to make it private, read this for info. They can still find it - if they know where to look. Other than that I guess you're out of luck since it's very hard to protect images in general. Since they could just take a screenshot while in-game and go from there.
  9. Then I would highly suggest that you edit existing resources(with permission) than to make an entirely new one. Having the player spawn with those items shouldn't be too hard to edit. As for the other things, I'm not able to understand just what you want. Do you not want clothes to spawn as loot or what? Try to be a bit more detailed, if possible.
  10. Thread of the year? First of all, I doubt you'd be able to pay anyone enough to take on such a big project. Secondly, there already is a(a few?) DayZ-based gamemode for MTA. Here's one for example; link to resource. (Linked by Castillo in another thread)
  11. That's the reason the refresh command exists...
  12. What if you create a new resource and paste the code over to new files? This does seem rather odd
  13. Doubt it's what's causing it, but files in the meta don't have a type argument. It uses a download argument.
  14. Are there any debug messages, also, you've made sure it's running server-side yeah?
  15. Dealman

    race state

    Well you need to define the player element. As of now it's returning nil - and as such the event won't be triggered. Try removing the playerElement. Then it will trigger for all players currently on the server.
  16. Dealman

    race state

    Create the event client-side using addEvent, then use an event handler. IE; function myClientFunction_Handler() -- Wow, such code. Very program end addEvent("myEvent", true) -- True means you can trigger this event via the server. False means you can not. addEventHandler("myEvent", getRootElement(), myClientFunction_Handler) -- You'll of course need an event handler. Then trigger it via the server like this; triggerClientEvent("myEvent", getRootElement()) -- This will trigger for all players. triggerClientEvent(playerElement, "myEvent", getRootElement()) -- This will trigger for the specified player element only. Edit: Of course you can use it to transfer data as well. Example; function myServerFunction_Handler() local argumentOne = "Hello World!"; local argumentTwo = 1.337; triggerClientEvent("myEvent", getRootElement(), argumentOne, argumentTwo) end function myClientFunction_Handler(arg1, arg2) -- You can define those with whatever name you want outputChatBox(arg1) outputChatBox(tostring(arg2)) -- Since 2nd variable is a float value - convert it to a string end addEvent("myEvent", true) addEventHandler("myEvent", getRootElement(), myClientFunction_Handler)
  17. Dealman

    race state

    You'll need to change the boolean from false to true if you want to be able to remotely trigger it from a client. Nvm, misunderstood what you're trying to do. Just create an event for your client-side function, and trigger it via the server-side event I provided.
  18. Dealman

    race state

    function exampleFunction_Handler(newState, oldState) if(newState == "LoadingMap") then -- Your code here end end addEvent("onRaceStateChanging", false) addEventHandler("onRaceStateChanging", getRootElement(), exampleFunction_Handler) This event is server-side.
  19. You could make use of the function getKeyState to see whether lctrl is being held down or not.
  20. Dealman

    dxDrawText

    Use the event onClientClick. You'll have to make some calculations to check whether the clicked position was within the boundaries of the drawn text.
  21. They would have to download the image once, and then that's all it renders. It is way more efficient than doing those calculations with every frame. And easier. And looks better.
  22. Dealman

    GTA SA Nodes

    As I said, used for Pedestrians. Edit: I think I found a few relevant threads, but all links are out of date.
×
×
  • Create New...