-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
As you can see player is already defined, in the parameters. outputChatBox("TEXT",player,255,69,0)
-
AFAIK, functions from serverside have less lagg impact, because they are using just 1 function. https://wiki.multitheftauto.com/wiki/LoadMapData And when you are loading them on clientside, you need a lot of functions per object to set their properties.
-
It seems they are seeing each other in light-sync mode. You also have this problem when they are close to each other? (the peds)
-
[quote name=..&G:..]Doesn't work Here is what I did in the other script that triggers the event function hideInterfaceComponents() triggerEvent("hideHud", getLocalPlayer()) loadSettings() saveLanguageInformation() end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), hideInterfaceComponents) 1 That other script was already running before you triggered the event? 2 And what happens when you do: triggerEvent("hideHud", getLocalPlayer()) triggerEvent("hideHud", root) 3 Both are 100% clientside? 4 And what will happen when you put the event in the same script?
-
local handler = false function myHudFunction () if handler then removeEventHandler("onClientRender",root,renderHud) handler = false else addEventHandler("onClientRender",root,renderHud) handler = true end end addCommandHandler("showhud",myHudFunction) addEvent("hideHud",true) addEventHandler("hideHud",root,myHudFunction) triggerEvent("hideHud", getLocalPlayer())
-
no, You're Welcome.
-
Then why are you saying it doesn't work..... when it does work..... When the zombies spawn some of them will end up in buildings etc. and will fall in to ground. So there will never be 50 at the same Area Also: addEventHandler ( "onResourceStart", getRootElement(), teste ) Should be: addEventHandler ( "onResourceStart", resourceRoot, teste ) Else with every resource that starts, there will be more zombies.
-
Skins between 26 and 41.....
-
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?
