
Ceeser
Members-
Posts
38 -
Joined
-
Last visited
Everything posted by Ceeser
-
Either im just dumb or others dont get this as well.. What do you mean by "REMOVE the trigger"? remove the eventHandler? remove the function? remove the triggerEvent? its still unclear what you exactly mean by remove trigger
-
Fixed. I already had 1.5.6 R8 installed on the server, but now after installation of 1.5.6 R9 it works. Maybe there was just something wrong with my server somehow. (Btw, the error ive posted was the error in debugscript. "..." is just the filepath) #closed
-
Hey, mta wiki says tocolor is a shared function which actually just makes sense and im pretty sure ive used it serverside already in another script. But now it tells me "Error: ... attempt to call global 'tocolor' (a nil value)". Does anyone have a clue why its not existing serverside for that script?
-
function trigger() label = guiCreateLabel(...) addEventHandler("onClientGUIClick", label, function_label) end -- and now call the function like this: trigger() Idk if thats what you want but if so.. Instead of the triggerEvent just call the function itself Also you are talking about trigger in your post but in the code snipped you have "tigger" everywhere
-
Add these utility functions: function isPlayerAllowed(uPlayer, strRank) if (not strRank) then strRank = "Admin"; end local strAccName = getAccountName(getPlayerAccount(uSource)); if (isObjectInACLGroup("user."..strAccName, aclGetGroup(strRank))) then return true; end return false; end function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end Ok.. this is for a temporary mute: Until unmute or reconnect. But it will stay in case of script restart. function onChat(_, messageType) if (messageType == 0 and getElementData(source, "chatMute")) then cancelEvent(); end end addEventHandler("onPlayerChat", root, onChat); function muteChatForPlayer(uSource, _, strPlayerName, bState) if (not isPlayerAllowed(uSource)) then -- output uSource error: no permissions end if (not bState) then bState = nil; else bState = (bState == "true") and true or nil; end local uPlayer = getPlayerFromPartialName(strPlayerName); if (uPlayer) then setElementData(uPlayer, "chatMute", bState); if (bState) then -- output uSource that uPlayer got muted -- output uPlayer that he got muted else -- output uSource that uPlayer got unmuted -- output uPlayer that he got unmuted end end end addCommandHandler("chatmute", muteChatForPlayer); This one is "permanent": Until unmute or script restart. In this case a reconnect wont help to get unmuted. local tblMutedPlayers = {}; function onChat(_, messageType) if (messageType == 0) then local strSerial = getPlayerSerial(uPlayer); if (tblMutedPlayers[strSerial]) then cancelEvent(); -- output source "you are muted" end end end addEventHandler("onPlayerChat", root, onChat); function muteChatForPlayer(uSource, _, strPlayerName, bState) if (not isPlayerAllowed(uSource)) then -- output uSource error: no permissions end if (not bState) then bState = nil; else bState = (bState == "true") and true or nil; end local uPlayer = getPlayerFromPartialName(strPlayerName); if (uPlayer) then local strSerial = getPlayerSerial(uPlayer); tblMutedPlayers[strSerial] = bState; if (bState) then -- output uSource that uPlayer got muted -- output uPlayer that he got muted else -- output uSource that uPlayer got unmuted -- output uPlayer that he got unmuted end end end addCommandHandler("chatmute", muteChatForPlayer);
-
Hey, since this are not just a few lines of code.. The screen shows the error in nz_c.Lua. I assume ist the upper script, because you didnt write its name next to it. Well in that case: local distance = getDistanceBetweenPoints3D ( x,y,z, zx,zy,zz ) This is the line 128 of the upper script and i betthis is not the actual line 128 of your script where the error occurs - getDistanceBewerrnPoints3D would say something like this in case of failure: "Bad argument @getDistanceBewerrnPoints3D, expected number at argument X, got ..." So please tell us the correct line in the scripts here (or paste to the full script, or at least from beginning to error line). ..or maybe highlight the error line or put it once seperate below
-
Its fking weird. Exactly like last time.. I tried everything, but it didn't work. Reinstalled GTA, MTA, tried everything i could imagine what could help. Followed these instructions: but they didnt help as well. And now? I gave up on it and didnt touch it for about 1 hour.. and guess what? IT :OING WORKS AGAIN. For no reason. I changed nothing since i last tested where it didnt work.. Somebody understand that MTA Error please, lol.
-
Since today I get the [CD16] errorcode when I attempt to connect to ANY mta server, yesterday everything was fine. When I click on any server I wanna connect to the "Connecting" window comes up, showing "Connecting to [IP] ..." while the screen is frozen for ~8-10 seconds. Then is shows "Entering the game ..." for ~8 seconds. After these 8 seconds the "Error [CD16]" window popps up telling me "Disconnected: connection to the server was lost". What I've tried already: Restarting Computer Restarting Router Reinstalling MTA Reinstalling GTA + MTA Disabling any computer protection (Firewall, anti-virus etc) after fresh GTA/MTA install Connect to local map editor/host a game (from menu) - Doesn't work as well. Connect to a server on my notebook (so another computer) - works. Here is the MTADiag output: https://pastebin.mtasa.com/346695611 I already had this issue a few weeks ago the first time. I backupped data to reinstall windows, then it suddenly worked again. This time.. it doesn't.
-
dxDraw3DText That is used for use with onClientRender in your Script, no need for the resource
-
http://pastebin.mtasa.com/253107142
-
Hi, whenever I'm doing something in the map editor, Full Test start - Test and then quit F1 and test crashes my MTA. Example: I make a new world, put in game settings on race, sat down object 3458 and a spawn point on it, then I save. Now I run the test, go short and then finish it again and MTA crashes immediately when I stop. The world we are not destroyed. I that happens even without that I'm wearing Netools or MTA sonstoge modification I did not like any DLL file or something added. I have also MTA ever fully reinstalled. --> Translated by Google translator^^ <--
-
Hi, immer wenn ich etwas mache im Map editor, Full Test starte - Teste und danach F1 und test beenden crasht mein MTA. Beispiel: Ich mache eine neue Welt, stelle in Game settings auf Race, setzte object 3458 hin und einen spawnpoint drauf, danach speichere ich ab. Jetzt Starte ich den Test, fahre kurz und beende ihn danach wieder und MTA Crasht direkt, wenn ich stoppe. Die Welt wir aber nicht zerstört. Ich das passiert auch ohne das ich Netools oder MTA anhabe, sonstoge modifikation habe ich nicht wie irgendeine DLL datei oder sowas eingefügt. Ich habe MTA auch schonmal komplett neu installiert.