Jump to content

tosfera

Members
  • Posts

    1,193
  • Joined

  • Last visited

Everything posted by tosfera

  1. tosfera

    Solved

    is the outputChatBox working? Add a new one after: if logFile then outputChatBox("test")
  2. You first have to define pizza as a table before adding it in like that, that's just how lua works; local pizza = { } pizza [ source ] = createObject ( 1271, 0, 0, 0 ) Make sure to put the "local pizza..." at the top of your document to avoid nil values.
  3. It might work but .. Any Example's or something please ? Try this last post. Why would you link them to the VC forum..? Zuher, you can also use setAccountData and getAccountData for this. Just make sure your account system logs in to the default account system of MTA. If you want to avoid that, use dbQuery to get the database up and running. There are loads of examples on the wiki for that.
  4. Everything has been explained here, the code from Solidsnake should work; https://forum.multitheftauto.com/viewtopic.php?f=108&t=37502
  5. You can only play songs that are music files, you can't just simply put in a youtube link. I hope you understand that.
  6. Don't attach it to the player, attach it to the bones of the player. It'll automatically rotate and be much more reliable
  7. tosfera

    fileCreate

    why did they put it as a shared function anyway.. adding files to someone's computer in this way is way too easy. Since when is fileCreate a shared function? As far as I can remember there were endless discussions about this since people didn't want it.
  8. you can also use attachElements[wiki] to the body and work around with several troubles with animations and offsets to get it working.triggerServerEvent and triggerClientEvent both return either true or false - depending on whether the event was successfully reached or not. So if you use triggerServerEvent to try and find out whether a certain player belongs to a certain group or not is not gonna be very useful if you try and use the state of the trigger. So long as the event is successfully triggered - it would always return true for you, whether the player is in that ACL group or not. So like Noki said, you'll need to use triggerClientEvent. Client -> Server -> Client
  9. getPlayerAccount and isGuestAccount
  10. use setCameraMatrix in a onClientRender from the position from the player by increasing the Z with a few, looking at the position of the player. ( really ugly way of doing this.. )
  11. You got a "triggerClientEvent (root, "destroySound", root) " in the server's side. Use that after you destroy the timer and it'll stop the sound too and restart it (before "onStartTaserSound" ). Or another thing you can do, check if the sound is already an element in the client's side. If so, don't restart it.
  12. If it is the same resource, you don't have to export nor addEvents for it to call them. you can cross the borders of files IF the types are the same ( server to server, client to client ). As an example; file1: function book() outputChatBox("Ha! you said book!"); end file2: function readBook() outputChatBox ( "I'm going to say book..." ); book(); end That'll work. Exporting a function is sharing functions over the entire server, no matter which resource it is coming from.
  13. Is the object two-faced/double-faced or what ever the editor calls it? The problem might also be that the LOD is still there and hides the other objects.
  14. SetWindowFlashing +1 for this, and also for the vehicle sync. Thanks Team! (:
  15. You're going to have to check the OnClientGUIChanged and filter the rows in the grid to only show the actual items in there.
  16. tosfera

    [HELP] Wheels

    overwriting it is possible, yes. That's the basics of programming, you're just assigning a new value to the variable.
  17. I did that, but If I canceled the event, the cop can't even tase wanted, and I need to cancel the fire only if the timer is still running. Any idea? If you only cancel the damage for the player client sided, the player can still shoot the tazer. If you do want the player to get damage when the tazer is attached to his body and destroys every little living thing inside of him. You can always set the health of the player with setElementHealth. Remember, you should cancel the onClientPlayerDamage.
  18. tosfera

    [HELP] Wheels

    I'm wondering in his case, he assigned the name 'source' to the first parameter, which is thePlayer. Would source then be overwriten and source actually be thePlayer instead of the vehicle? Overwritting the actual vehicle to get the vehicle after that again? I'm sorry but that's just plain stupid and resource intensive. @1LoL1; "vehicle" isn't defined because the source of the actual function is the vehicle.
  19. Comparing values uses 2x = as in "==", not "=".
  20. You should always make sure that your returned element from guiCreateFont is an actual element. If it failed to create and you have overwritten the default font, it'll start to lag like spacing cows and eventually crash your client. Add a new if-statement after local font1_segoeui = ... to see if it isn't false. if it it, recreate it with the same line and proceed.
  21. tosfera

    [HELP] Wheels

    I would suggest you to rename your player element from source to thePlayer, like so; local w = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1096,1097,1098} -- all: 17 addEventHandler ( "onVehicleEnter", getRootElement(), function ( thePlayer ) local wheels = ( getElementData ( thePlayer, "wheel" ) or 0 ); if ( wheels == 9 ) then addVehicleUpgrade ( source, w [ 9 ] ); end end ); but to avoid you from making 17 if-else-statements, you can also do this; addEventHandler ( "onVehicleEnter", getRootElement(), function ( thePlayer ) local wheels = ( getElementData ( thePlayer, "wheel" ) or 0 ); addVehicleUpgrade ( source, w [ wheels ] ); end ); Which will automatically get the right upgrade for your vehicle.
  22. You should make the sound loop, like so; local sound = playSound ( "taser/Fire.wav", true )
  23. Nope, you should cancel it client sided too. Create a new function in your client with "onClientPlayerDamage" ( or something like that ) and do the same checks, if the weapon is 23 and the shooter is a cop, just cancel the event.
  24. you've misplaced the outputChatBox, another thing you should do is also add a cancelEvent().
  25. I already gave you the answer. The link which you're using to send the email isn't working. It's being redirected to the homepage of the hosting company meaning that the file isn't there. How can a script fetch a page when it's not there?
×
×
  • Create New...