-
Posts
6,063 -
Joined
-
Last visited
-
Days Won
208
Everything posted by IIYAMA
-
and the variables are correct? During the proces
-
and where are your debug stuff? You don't even know if the event did triggered when a zombie died.
-
... addEvent ( "onZombieWasted", true )
-
Because you forgot to save the future time and forgot to remove it and to delete the elements.
-
By using the array variable multiplying by the distance between the text. Required: table.remove 50 pixels between the text. newPosition = positionY -(50* array)
-
Should be: if ZombieKills < 30 then-- till 29 ZombieKills = ZombieKills+1 else --30 or higher = reset. ZombieKills = 0 teste() end
-
There are limits for all custom objects, even for lowLOD elements. So: Impossible for now.
-
Did you check if the script did started and error/warnings? Did you tried to debug it with outputDebugString() ? Did you checked all variables values while you output them? The only thing I see is a cut of event handler: addEventHandler("onPlayerWasted", getRootElement(),play--...
-
Here you have all information you need to store the information. Maybe:(client variant maybe better for custom weapons/damage) addEventHandler("onPlayerDamage",root, function (attacker,weapon,bodypart,damaged) end) I don't know much about using shaders, except replace texture with it. (and not models if possible) If you know how to script it will be a funny project, if not I can better spend my time on other things.
-
Just faked with scripts and shaders etc. Can't add more weapons.
-
I started to learn lua after I started mta, to be honest I don't know the names for the stuff, I only know how they can be useful. How would you describe it?
-
@ CrystalMV Yes, that is what I meant. Very strange, no explanation, but no problems with it. @tosfera I make all possible functions variables local, because they are 2/3 times faster then a normal function variable. A function returns their own variable, except in this case it returns a local one. local function myFunction(text) outputChatBox("myFunction "..text) end local mySecondFunction = function(text) outputChatBox("mySecondFunction "..text) end local myStrangFunction function myStrangFunction(text) outputChatBox("myStrangFunction "..text) end local myFunctionTable = {myFunction,mySecondFunction,myStrangFunction,outputChatBox} addEventHandler("onResourceStart",resourceRoot, function() for i=1,#myFunctionTable do myFunctionTable[i]("HI!") end end) All function variables became local and get looped inside a table. Included a function we already know "outputChatBox".
-
local newTable = {} local size = fileGetSize(theFile) local data = fileRead(theFile, size) -- loop local theModel = xmlNodeGetAttribute(node, "theModel") local modelID = xmlNodeGetAttribute(node, "modelID") newTable[#newTable+1]= {theModel,modelID} --- -- in function -- triggerLatentClientEvent(source, "onClientPlayerPreDownload", source, newTable,size,data) Something like this, except most of those things should be out of the function, because it only have to be done one time. Also you should first pre communicate with the server before you are sending this data over. Because now you are still sending everything to the client, since that is the thing you want to prevent.
-
To save your stuff so it can be send with 1 triggerLatentClientEvent
-
where is your table?
-
Because you are sending a lot of trigger events, when you can just do it with one triggerLatentClientEvent, a table and a loop.
-
https://wiki.multitheftauto.com/wiki/SetTimer Why I can't use local functions for my timers? I am doing it for a long time and it is working.... and never had any strange problems with it......
-
because you can't past files with this function. Only data. Tables, strings, numbers, userdata etc. You have to read the information from it first or read the whole file. And then recreate it at clientside, with the new data.
-
What a poor guy... and no brains.
-
NO, cause the server ALWAYS start first. You have to send a message from clientside > onClientResourceStart < to the server and send the data back to the client.
-
Cause the server is already sending data while the client hasn't loaded yet. (loaded the client.lua file)
-
-- zet boven aan het script. local vehicleOwners = {} -- opslaan vehicleOwners[player] = vehicle --verkrijgen local vehicle = vehicleOwners[player] -- controleren en verweideren if isElement(vehicle) then destroyElement(vehicle) end -- automatisch schoonmaken wanneer iemand weg gaat. addEventHandler("onPlayerQuit",root, function () local vehicle = vehicleOwners[source] if vehicle then if isElement(vehicle) then destroyElement(vehicle) end vehicleOwners[source] = nil end end) Meer heb je eigenlijk niet nodig. Je moet wel alle "variables" de goede definities geven.
-
No I don't get what you mean.... Why don't you just do: https://wiki.multitheftauto.com/wiki/GetVehicleName Instead of wasting your ram. And go read this: