-
Posts
636 -
Joined
-
Days Won
8
Everything posted by ds1-e
-
What's the point for that? If cache="false" does same?
-
Like before, but will be better if you will rewrite them once again, and not copy, because of invisible special character, probably.
-
Add to meta. <min_mta_version client="1.5.6" server="1.5.6"/>
-
The problem was in outputChatBox, so add them again, i also find out other problem, check again. function upLevel() local players = getElementsByType("player") local get_players = {} for i = 1, #players do local player = players[i] local player_acc = getPlayerAccount(player) if player and player_acc and not isGuestAccount(player_acc) then local minutes = getElementData(player, "minutes") if not minutes then setElementData(player, "minutes", 1) else setElementData(player, "minutes", minutes + 1) end if getElementData(player, "minutes") > 1 then local level = getElementData(player, "Level") or 0 local bonus = math.random(25, 950) local interest = math.random(25, 150) local value = bonus - interest setElementData(player, "minutes", 0) setElementData(player, "Level", level + 1) givePlayerMoney(player, value) table.insert(get_players, player) end end end triggerClientEvent(get_players, "blipuplevel", resourceRoot) end setTimer(upLevel, 60000, 0)
-
If you want, you can try my version, which also i optimized a bit. -- Server-side function upLevel() local players = getElementsByType("player") local get_players = {} for i = 1, #players do local player = players[i] local player_acc = getPlayerAccount(player) if player and player_acc and not isGuestAccount(player_acc) then local minutes = getElementData(player, "minutes") setElementData(player, minutes, minutes or 0 + 1) if minutes and minutes > 1 then local level = getElementData(player, "Level") local bonus = math.random(25, 950) local interest = math.random(25, 150) local value = bonus - interest setElementData(player, "Level", level or 0 + 1) givePlayerMoney(player, value) outputChatBox("#FFFFFF[ #FAAC58FW-LEVEL #FFFFFF]", player, 255, 255, 255, true) outputChatBox("#FAAC58**#FFFFFFVocê ganhou mais um #FAAC58level", player, 255, 255, 255, true) outputChatBox("#FAAC58**#FFFFFFPagamento : R$ #00FF00"..value, player, 255, 255, 255, true) table.insert(get_players, player) end end end triggerClientEvent(get_players, "blipuplevel", resourceRoot) end setTimer(upLevel, 60000, 0) -- Client-side function blipuplevel() local sound = playSound("som/blip.mp3") setSoundVolume(sound, 0.5) end addEvent("blipuplevel", true) addEventHandler("blipuplevel", resourceRoot, blipuplevel)
-
@giovanymito besides, imho it's not good way to send multiple triggers within loop instead of one.
-
triggerClientEvent(thePlayer, "blipuplevel", thePlayer) thePlayer - where is defined? This player doesn't exist.
-
I'm not expert at this, but yes, compiling with highest level of obfuscation. Since i don't get answer yet for my topic, one more possible way is sending client scripts with loadstring and triggerClientEvent, i've saw it somewhere, but i don't know if at the moment is worth to add this kind of protection, or if it's working at all.
-
I guess, it's a massive system plus it also uses database. Code can be badly optimized. But most likely it performs a lot of things at once. If i would be on your place, i would delay executing certain functions within timers.
-
Try like that: function addRadio() outputChatBox("WOOOORKS") outputChatBox("You're currently listening to "..getRadioChannelName(getRadioChannel()).."!") end addCommandHandler("MyRadio", addRadio, false, false) And if this wouldn't work, be sure that code is in client-side, also check debugscript 3 for errors/warnings.
-
I know about that, but still i'd like to add more 'security layers'. What's possible on server-side, it's already there.
-
Hey. Is there any good way to secure scripts more? Excluding compiling with highest level of obfuscation, and cache="false" for client (which i am already using). I've saw that is possibility to send client scripts from server, with loadstring. It's is really worth to add this kind of 'security layer'? And if yes, then how it should exactly looks. Besides, i know, that even after all, it's still possible to steal my resources.
-
Solved. https://wiki.multitheftauto.com/wiki/SetVehicleDamageProof
-
Sorry, but i don't have idea, how it could be done.
-
Hi. I need a way to disable that if vehicle is flipped, it gets on fire. Any ideas?
-
Hmm, maybe timer, which will use trigger(Latent)ClientEvent + this function. It will check if player is downloading resources. https://wiki.multitheftauto.com/wiki/IsTransferBoxActive If it returns true, then send back trigger back to server, reset timer, and check again after x minutes, otherwise send back to server, kill timer and kick player?
-
Are you sure that is good idea? What if he will be downloading resources more than 5 minutes? Besides few advices. Player in event is defined as: source From wiki: You don't need to "create" function within timer, for me it's simpler to use following syntax. Also, time interval is 5000 ms, 5 minutes = 300 000 ms. Take a look at `times to execute`, it's unlimited, most likely it will throw out errors, because defined player doesn't exist, if he will quit. -- From wiki setTimer ( function theFunction, int timeInterval, int timesToExecute [, var arguments... ] ) -- -- Function, interval, times to execute, argument1, argument2 setTimer(kickPlayer, 300000, 1, source, "Reason")
-
Check that - https://wiki.multitheftauto.com/wiki/GuiGridListSetSelectionMode and if this wouldn't work, i think you can simply unselect each other, when clicking on gridlist, with using - https://wiki.multitheftauto.com/wiki/OnClientGUIClick and https://wiki.multitheftauto.com/wiki/GuiGridListSetSelectedItem
-
If you want execute other function at client-side, just use timer. I wouldn't use multiple triggers at once, to not harm server, but still it depends, what you're trying to do. https://wiki.multitheftauto.com/wiki/SetTimer Also, you might read this topic, and exactly IIYAMA posts, which explain a bit about triggers.
-
You can use: triggerClientEvent, which will execute your client-side function, for certain player. https://wiki.multitheftauto.com/wiki/TriggerClientEvent
-
Hey. Is there any way to get string with spaces from arguments in command? For example i want to get complete string when using command: /getstring String with spaces So it doesn't count as other arguments, and it should return one complete string.
-
Why do you create other topic with it? I've answered you there.
-
What you try to achieve, trigger event? I don't think that this is possible to do, that you can start resource for certain player.