-
Posts
1,423 -
Joined
-
Last visited
-
Days Won
19
Everything posted by Tekken
-
Server local aclGrpups = { "Admin", "Moderator" }; addEventHandler("onPlayerLogin", root, function(theCurrentAccount) for _,v in ipairs(aclGrpups) do if isObjectInACLGroup("user."..getAccountName(theCurrentAccount), aclGetGroup(v)) then setElementData(source, "staffmember", 1); return; end end setElementData(source, "staffmember", false); end); Client addEventHandler("onClientPlayerDamage", root, function() local team = getTeamName(getPlayerTeam(source)); if (team == "STAFF" and getElementData(source, "staffmember") == 1) then cancelEvent(); end end);
-
România Euphobia Roleplay(200.000 lei de început) www.rrs-gaming.com
Tekken replied to Raileanu Petru's topic in Servere
Tu... :)))) -
Reinstaleaza Windows-ul
-
Nope! Output [4-8-2017|13:43] Tekken just did something. It's just a preference. Greetings.
-
Here you go function time() local time = getRealTime(); return "["..(time.monthday).."-"..(time.month+1).."-"..(time.year+1900).."|"..time.hour..":"..time.minute.."]"; end function log(text) local f = fileOpen("logs.txt"); if not f then f = fileCreate("logs.txt"); end fileSetPos(f, fileGetSize(f)); fileWrite(f, time().." "..text:gsub("#%x%x%x%x%x%x", "").."\r"); fileFlush(f); fileClose(f); end log("SOMETHING"); You can also create a event to trigger it from another resource.
-
Like this [28-7-2017|9:6] (GLOBAL) Tekken: dsdsdsd [28-7-2017|9:7] (StaffChat) Tekken : dsds [28-7-2017|9:7] (GLOBAL) Tekken: dsd [28-7-2017|9:7] (StaffChat) Tekken : xcx [28-7-2017|9:8] (GLOBAL) Tekken: dsd [28-7-2017|9:59] (GLOBAL) [Tz]Marius5: salut [28-7-2017|10:6] (GLOBAL) [Tz]Marius5: Salut
-
Hi there, I am trying to make a script that loads text from a *.txt file but I keep getting this error, why? addEventHandler("log", getRootElement(), function(message) local f = fileOpen("logs.txt"); fileSetPos(f, fileGetSize(f)); fileWrite(f, time().." "..message:gsub("#%x%x%x%x%x%x", "").."\r"); fileFlush(f); fileClose(f); end); This one works. But when I try like this addCommandHandler("readlog", function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("Admin")) then local f1 = fileOpen("logs.txt"); if f1 then text1 = fileRead(f1, fileGetSize(f1)); fileClose(f1); end triggerClientEvent(player, "show:LOGS", player, text1); end end); It doesn't and I get this warnings fileOpen: unable to load file Bad argument @ 'fileGetSize' [Expected scriptfile at argument 1, got boolean] Bad argument @ 'fileRead' [Expected scriptfile at argument 1, got boolean] Bad argument @ 'fileClose' [Expected scriptfile at argument 1, got boolean] Hmm, if I set the readOnly propriety to fileOpen I only get the unable to load file warning.
-
Care resursa? De asemenea in titlu ai pus "erroare" (ROGLEZA), ce eroare?
-
Yup, is just that I just figured that out. Thank's anyway without you would've take me much more time to figure it out.
-
Yeah thanks it worked. But I already tried this and didn't work, not because I didn't had the right script but because I also have some text over the image and every time I hover the text the alpha changes. :\
-
Hello, So I have a table like this: local myTable = {thing1={},thing2={}}; for i = 1, 20 do myTable.thing2[i] = "something"..i; end Those tables stores GUI images and I want to do something like this: addEventHandler("onClientMouseEnter", root, function() if (source == myTable.thing2[?]) then guiSetAlpha(myTable.thing2[?], 1); end end); My question is, how do I know what "thing2" my mouse enters? is there a way to find out? Cause I don't want long functions with tones of if this do that statements. Thank you.
-
There you go, I have it since MTA 1.4 came out it's a RAR archive since the executable doesn't work with other than MTA 1.3.5 https://mega.nz/#!Aw4wjAxL!75tSMz1CTenosiKBXi2ka9NTMvKDpkecAa3WyHobgl8
-
Nu exista un mod/program. Trebuie sa lucrezi in paralel cu Map Editor, Scripting si un program de creat obiecte 3D. Iti recomand sa incepi cu scriptingul sa vezi cu ce se mananca dupa care sa incepi usor cu Map Editor si cand ai umpic de idee cam cum merg lucrurile sa te apuci de 3D. Pentru orice nelamurire poti intreba linistit pe acest forum, cred/sper, ca sunt destui, destul de draguti incat sa iti explice cea ce nu stii.
-
delete internal.db, also delete backeup.db just to be sure.
-
It doesn't work that way but anyway you are on the wrong board you should post it to Scripting board. So you want a resource that give's you health if you are a VIP right? So what you should do is: - Create VIP Group in acl.xml (already done) - Add the specific players there. ( Like this user.USERNAME ) - Now make the resource but like this now: addCommandHandler("viphealth", function(player) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(player)), aclGetGroup("VIP")) then setElementHealth(player, 1000). end end);
-
I can but I won't, just try it yourself and maybe you will figure out how it's done.
-
I have already agreed to this.
-
Not that slow, but yeah SQLite it's a lot better, I have this since I've started to do scripts so I just copy/paste it here
-
Check this out: addCommandHandler("savecars", function() --Backup function. --You should make an ADMIN rights check. if fileExists("settings.xml") then fileDelete('settings.xml'); end local cars = xmlCreateFile("settings.xml", "cars"); for _,v in ipairs(getElementsByType("vehicle")) do local TheCar = xmlCreateChild(cars, "car"); local x,y,z = getElementPosition(v); local rotX,rotY,rotZ = getElementRotation(v); xmlNodeSetAttribute(TheCar, "model", getElementModel(v)); xmlNodeSetAttribute(TheCar, "x", x); xmlNodeSetAttribute(TheCar, "y", y); xmlNodeSetAttribute(TheCar, "z", z); xmlNodeSetAttribute(TheCar, "rotx", rotX); xmlNodeSetAttribute(TheCar, "roty", rotY); xmlNodeSetAttribute(TheCar, "rotz", rotZ); end outputChatBox("Car backup done!", root, 0, 255, 0, false); xmlSaveFile(cars); xmlUnloadFile(cars); end); addCommandHandler("loadcars", function() --Load function. -- You should make an ADMIN rights check. local cars = xmlLoadFile("settings.xml"); if (cars)then local veh = xmlNodeGetChildren(cars); for _,v in ipairs(veh) do local Model = xmlNodeGetAttribute (v, "model"); local X = xmlNodeGetAttribute (v, "x"); local Y = xmlNodeGetAttribute (v, "y"); local Z = xmlNodeGetAttribute (v, "z"); local Rotx = xmlNodeGetAttribute (v, "rotx"); local Roty = xmlNodeGetAttribute (v, "roty"); local Rotz = xmlNodeGetAttribute (v, "rotz"); createVehicle(tonumber(Model), tonumber(X), tonumber(Y), tonumber(Z), tonumber(Rotx), tonumber(Roty), tonumber(Rotz)); end outputChatBox("All cars loaded!", root, 0, 255, 0, false); end end);
-
Preferences > Settings > Add: "auto_complete": false,
-
Hmm somehow for me the images are there, anyway I will fix this ASAP.