Jump to content

^.^

Members
  • Posts

    25
  • Joined

  • Last visited

About ^.^

  • Birthday 10/06/1996

Details

  • Gang
    pG//
  • Location
    Austria

Recent Profile Visitors

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

^.^'s Achievements

Advanced Member

Advanced Member (8/54)

0

Reputation

  1. Yes, but the client code doesn't output a text the 2nd time
  2. Hey, I have some problem with a trigger. I trigger some tables to the client to load them. That works fine. After I die it should trigger some other tables with the same function again to the client, but after the 1st trigger it doesn't trigger it anymore. The Code: function setUPDMPlayer(player,spawn,o,m,p) --outputChatBox(#spawn) if spawn then toggleControl(player,"vehicle_secondary_fire",true) toggleControl(player,"vehicle_primary_fire",false) local rand = math.random(tonumber(#spawn)) spawnPlayer(player,spawn[rand].posX,spawn[rand].posY,spawn[rand].posZ) setElementDimension(player,1) local vehicle = createVehicle(spawn[rand].modelID,spawn[rand].posX,spawn[rand].posY,spawn[rand].posZ,spawn[rand].rotX,spawn[rand].rotY,spawn[rand].rotZ) end triggerClientEvent(player,"loadMapDM",root,mapDM,o,m,p) outputChatBox("Triggered Event") end Mabey you have a solution for my problem. Regards
  3. As GMorte already said you can compare the serial from the table and the serial of the player. You can also use the IP but that's not the best solution. Regards
  4. You have to use latentEvents, but ffs and TG have a special method for compressing their files I heard.
  5. ^.^

    [TUT]latentEvents

    Of course I explained the the use of triggerLatentClientEvent. Well I used always the file size cause the files were not over a size of 1 MB so it works perfectly. I'll add it to the code.
  6. Hey Guys, as an experienced member from TG said to me I should show you how to use latentEvents for loadingFiles I thought why not. So heres a small tutorial on how to use latentEvents. In this case it's for music and mod files. You can use latentEvents for every file you want to transfer to the client. triggerLatentClientEvent: This stands for triggering a client event. Either to transfer some kind of stuff or only to start a function. I'll explain it now more exactly. triggerLatentClientEvent([sendTo = the Element you wish to trigger it for], the Eventname, [the bandwith = how much bytes it should transfer in 1 second], [persist = [true/false]If the source resource stops and persist = true the latentEvent will be continued otherwise it will be interrupt], theElement = should be the root Element, [arguments = the files you want to trigger]) [ ] means that the are not needed So let's start with an easy example. If the resource starts a file should be opened and should get transfered to the client. Serverside: addEventHandler("onResourceStart", getResourceRootElement(getThisResource()),function() local file = fileOpen("yourFile.txt") local buffer if file then --Just asking if the operation was successfull buffer = fileRead(file,fileGetSize(file)) --the buffer is now our argument we want to trigger local output = {buffer} --more comfortable to transfer for _, p in ipairs(getElementsByType("player")) do --we send it now to every player on the server --to set the transferspeed we can use the filesize if not too high or an wishingvalue triggerLatentClientEvent(p,"sendFile",50000 or fileGetSize(file),false,root,output) end end end) Clientside: addEvent("sendFile",true) addEventHandler("sendFile",root,function(buffer) local newFile = fileCreate(":resource/yourFile.txt") --creating the clientfile for r, p in ipairs(buffer) do --getting the content out of the table by using a loop fileWrite(newFile,p) --writing the content into the new file end fileClose(newFile) --closing the file, this will also flush the file end)( Thanks for reading this short tutorial and if there are any questions please ask me or give me some ideas on how to improve this small tutorial. Best Wishes
  7. ^.^

    [SELL]Huntertimes

    You think I didn't have made that script? Do you have any proofs of that. I guess my one looks not really the same, but it's your opinion. If you don't believe me I can give you some proofs what I can do. So If you wish to check that pm me.
  8. ^.^

    [SELL]Huntertimes

    Evenmore what if client changes IP? If the Key exists. The IP will change in the database. @Anderl thank you for let know what I already know. Now back to topic!
  9. ^.^

    [SELL]Huntertimes

    I won't discuss with you about the security . You are right thath users can decompile that script, but the most normal users don't have a decompiler.
  10. ^.^

    [SELL]Huntertimes

    Well thats correct, but there is some kind of security to prevent that. Cause the Key Launcher is standalone so if you delete all this files this won't work anymore.
  11. It's nice from you to share this script with us. It seems that there are some mods to download. You could replace the download with fileWrite and latentEvents to save the client much time
  12. Hey, I want to sell my huntertimes cause I made a much better script. Price: 5€ via PayPal Included in Price: Changing the design to your wishes, 1 Update for the script, Licensekey to avoid copies ( ServerIP will be added to a database) You can test it here: mtasa://85.190.173.79:22003 Screen:
  13. I think this would help you: https://wiki.multitheftauto.com/wiki/Main_Page or this: https://wiki.multitheftauto.com/wiki/Sc ... troduction
  14. Well for first if you want to create an Image for 2 minutes use a timer and then print it on the playerscreen with a GUIImage otherwise you can use the dxDraw Functions and calculate the showing time with the tickcount. For your second problem there is something difficult. You can't change the gamemode for one player. If you want to do that it's like an arenagameode. So you have to work more clientside, ... If you want to use the dxFunctions dxDrawImage getTickCount For GUI guiCreateStaticImage setTimer
×
×
  • Create New...