-
Posts
575 -
Joined
Everything posted by codeluaeveryday
-
Guys, someone is accusing me of stealing his script!!! This script? ?!@?!?!?!?!? I made this, i have you guy's to back me up. https://community.multitheftauto.com/index.php?p= ... ts&id=2963
-
Hey guys, i require some more assistance understanding lua, TAPL, can you explain why this won't work. i have attempted to create a command which outputs to the chatbox, now, i am adding a language system, my meta file contains this setting btw. Its not done. syntax: /note hello output: (NOTE) Chris: Hello meta: <meta> <info author="[EGL]Chris" version="0.5" type="script" name="Essentials" description="This script add's alot of features for admin's and players. Hope you like it." /> <settings> <!--We currently accept the languages of english, spanish, arabic.--> <setting name="*language" value="spanish" /> <setting name="*joinquitcolor" value="255,200,100" /> </settings> <script src="admintag.lua" type="server" /> <script src="admincommands.lua" type="server" /> <script src="ip+serial.lua" type="server" /> <script src="outputs.lua" type="server" /> <script src="joinquit.lua" type="server" /> </meta> Server ofc: local root = getRootElement() local name = getPlayerName(source) local account = getPlayerAccount(source) local language = get('language') function note (text, msgtype) if language == "english" then if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000(NOTE) "..name..":#FFFFFF "..text,root,255, 255, 255) outputServerLog("NOTE: ".. name) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#FF0000(NOTE) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#FF0000(NOTE) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#FF0000Access to /note denied!",root,255, 255, 255) end end elseif language == "spanish" then if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000(NOTA) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#FF0000(NOTA) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#FF0000(NOTA) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#FF0000El acceso a /nota negado!",root,255, 255, 255) end end elseif language == "arabic" then if isObjectInACLGroup("user." .. account, aclGetGroup("Admin")) then outputChatBox("#FF0000(ملاحظة) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("SuperModerator")) then outputChatBox("#FF0000(ملاحظة) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Moderator")) then outputChatBox("#FF0000(ملاحظة) "..name..":#FFFFFF "..text,root,255, 255, 255) elseif isObjectInACLGroup("user." .. account, aclGetGroup("Everyone")) then outputChatBox("#FF0000 الحصول على /note رفض!",root,255, 255, 255) end addCommandHandler("note", note)
-
TAPL, I ABSOLUTELY LOVE YOU!!! YOU ARE HELPING ME ALOT. THANK YOU. The join works perfectly, what about the nick that wont work lol, any idea's?
-
Are you deaf, i said i fixed it.
-
thanks i see your point, i fixed the script to be client, but still the join message wont work. Anyone else? btw, i think its something todo witht he country and serial, and ip.
-
Yeah like that but I'd like the tracers to dissapear after they reach they're destination.. just like a bullet would like. But this resource is compiled, can't edit it. im thinking dxDrawLine3D https://wiki.multitheftauto.com/wiki/DxDrawLine3D
-
Hello all, my name is Chris, and i am currently developing a script which will be shared, i am a beginner, but it has some pretty useful stuff. It will be made public soon. For anyone which helps me with this script/project will be credited when released. Here i am trying to create a setting which changes the color of the text, BUT, thats not my only problem, the nick is fine, the join message wont work at all. Anyone aware why? The meta: <meta> <info author="[EGL]Chris" version="0.5" type="script" name="Essentials" description="This script add's alot of features for admin's and players. Hope you like it." /> <settings> <setting name="*language" value="english" /> <setting name="*color" value="255,200,100" /> </settings> <script src="admintag.lua" type="server" /> <script src="admincommands.lua" type="server" /> <script src="ip+serial.lua" type="server" /> <script src="welcome.lua" type="server" /> <script src="joinquit.lua" type="server" /> </meta> local color = get('joinquitcolor') local root = getRootElement() local name = getPlayerName(source) local old = oldNick local new = newNick local ip = getPlayerIP (thePlayer) local version = getPlayerVersion (playerSource) local country = call(getResourceFromName("admin"), "getPlayerCountry", source) function playerjoin(root) outputChatBox(name.." has joined the server. ["..country.."] ["..ip.."] ["..version.."]",root,color) end addEventHandler("onPlayerJoin",root,playerjoin) function playerquit(reason) if reason == Disconnected then outputChatBox(name.." has disconnected from the server",root, color) elseif (reason == Kicked) then outputChatBox(name.." has been kicked from the server",root,color) elseif (reason == Banned) then outputChatBox(name.." has been banned from the server",root,color) elseif (reason == TimedOut) then outputChatBox(name.." has lost connection with the server",root,color) end end addEventHandler("onPlayerJoin",getRootElement(),playerquit) function playernickchange(oldNick,newNick) outputChatBox("* "..old.." has changed his name to "..new,root,255,100,100) end
-
Well no one made a reply, so i will. Make sure the resource has admin rights. To be able to set team, the resource needs admin rights. setPlayerTeam requires admin rights, add it to the ACL, resource.stealth, and resource.stealth2. and i hope your not running them at the same time.
-
Ok, first of all the script is wrong. You have named the function: joinserverHandlerFunction, and used the event "joinserverHandlerFunction", No such thing as joinserverHandlerFunction, and u have loggedOut (HUH), that should be the function, let me fix this. I see what your trying, but i can't help that much: function logoutreconnect (thePlayer) local serverIP = "69.245.157.67" local serverPort = "22003" local serverPassword = "confidential" redirectPlayer (thePlayer, serverIP, tonumber(serverPort), serverPassword) end addEventHandler("onPlayerLogout",getRootElement(),logoutreconnect)
-
You mean like this: https://community.multitheftauto.com/index.php?p= ... ls&id=2002, maybe using a timer lol.
-
Hello, my name is Chris, and soon i will be releasing my essential's script, it has some pretty cool things. Features: * [ADMIN] [MOD] [sMOD] before nametags, depending on which ACL group there in. * Language translations, changeable in the meta.xml, and adminpanel. * Welcome Message * Some extra admin commands * Join Quit Message * Colour's are all easy to change in the meta. * Even more Phrases to translate: (all these need to be in arabic and spanish), it come's to mind that arabic is backwards, please give me an example in arabic where the IP is located. Your ip is: (IP) Your serial is: (SERIAL) (NOTE) [ADMIN] [sMOD] [MOD] Welcome (PlayerName). There are currently (Players)/(MaxPlayers) on the server There are currently (Players)/(MaxPlayers) on the server -- Command to see playercount. and more, ask me here to know the rest, also add my skype chrisinater22 you may reply with other language translations, i will add them. More features will be in it soon, we just need more suggestions and language translators, please let me know if you speak a language perfect. Current languages which are needed: Spanish, Arabic. If you have any suggestion's for languages and you can provide, you will be included in the credit's. Kind Regard's Chris
-
Thank you guys for your help, although one of my good friends who is a scripting god, told me instantly, + a better version.
-
@myonlake, sorry again, you were right about the script, it's fixed now, just one last issue, there is a 0 after the chat, why lol?
-
I know, im terribly sorry. myonlake worked, and binslayer thank you for helping me, and myonlake. Im really sorry. I mean Super Really Absolutely sorry.
-
Omg, i owe an appology to myonlake
-
YOU THINK IM A IDIOT!!!, Im admin, and console. and my meta is the same as that! IVE HAD OVER 5 SERVERS! myne is: <meta> <info author="[EGL]Chris" version="0.1" type="script" name="Admin tag" description="This script add's admin before someone's name. ect, [MODERATOR] [EGL]Chris, or [ADMIN] [EGL]Chris. " /> <script src="tag.Lua" type="server" /> </meta> im using Binslayer's one, function chatbox(text, command) local ncolor = getPlayerNametagColor() local name = getPlayerName(source) local accountname = getAccountName (getPlayerAccount(source)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" ) ) then cancelEvent() outputChatBox("#FF0000[ADMIN] "..ncolor..name..": "..text) outputServerLog( "CHAT: [ADMIN] " .. getPlayerName ( source ).. ": " .. text) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "SuperModerator" ) ) then cancelEvent() outputChatBox("#FFAE00[sMOD] "..ncolor..name..": "..text) outputServerLog( "CHAT: [sMOD] " .. getPlayerName ( source ).. ": " .. text ) elseif isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Moderator" ) ) then cancelEvent() outputChatBox("#00FF00[MOD] "..ncolor..name..": "..text) outputServerLog( "CHAT: [MOD] " .. getPlayerName ( source ).. ": " .. text ) end end addEventHandler("onPlayerChat", getRootElement(), chatbox) debugged: these only came out from the debug. WARNING: admintag\tag.Lua:2: Bad argument @ 'getPlayerNametagColor' ERROR: admintag\tag.Lua:7: attempt to concatenate local 'ncolor' (a boolean value)
-
tried it, that didn't work. I was wondering what the V was. Any ideas? Tried it didn't work.
-
ok, so i see my mistakes, but the script won't work. I see where i went wrong, thank you alot. Do you know why it wont work?
-
hey guys, its me again, i am requesting some help, i learned from my if mistakes, but now i fear of my else mistakes, can someone tell me why this won't add [ADMIN]/[MOD]/[sMOD] before someone's name, i tried to get this working. I am a beginner, and i wish to make this public soon. it will be editable. I will give credit to those who helped. I do thank TAPL for his last hand. Now i need help on this. Please can someone also explain Else's, if's, elseif's, do's, ect, and examples. I have learn most of my knowledge off the wiki. Thats why i am posting here now, to take it the next step. function chatbox(command, text) local ncolor = getPlayerNametagColor() local name = getPlayerName(source) if (aclGetGroup() == Admin) then outputChatBox("#FF0000[ADMIN] "..ncolor..name..": "..text) outputServerLog( "CHAT: [ADMIN] " .. getPlayerName ( source ).. ": " .. text) end else if (aclGetGroup() == SuperModerator) then outputChatBox("#FFAE00[sMOD] "..ncolor..name..": "..text) outputServerLog( "CHAT: [sMOD] " .. getPlayerName ( source ).. ": " .. text ) end else if (aclGetGroup() == Moderator) then outputChatBox("#00FF00[MOD] "..ncolor..name..": "..text) outputServerLog( "CHAT: [MOD] " .. getPlayerName ( source ).. ": " .. text ) end else if (aclGetGroup() == Everyone) then outputChatBox(ncolor..name..": "..text) outputServerLog( "CHAT: " .. getPlayerName ( source ).. ": " .. text ) end end addEventHandler("onPlayerChat", chatbox)
-
setGameSpeed (Freezing everyone, ect)
codeluaeveryday replied to codeluaeveryday's topic in Scripting
Thank you TAPL, i have always been a fan of your War Panel for your basemode, excellent. The setting speed works perfectly. The outputting doesnt, when i tried outputChatbox(name.." has unfroze all players!",source,0,255,0) else outputChatBox("Players are not frozen!",thePlayer,0,255,0) i originally wanted the second output to output to the player (visibility). while the first to goto all players. but, with the new one it doesnt output at all. Maybe the way i set it out? -
Hey guys, I am trying to create a script for race which allows me to freeze all players at once, I could use setplayerfrozen, but i'm too dumb to be able to make it apply to all players (please explain that too me). I have tried many things, like if separate from else, now i'm trying elseif, I have never used if, else, then. now it's a good time to learn. i woke up and thought maybe if getGameSpeed = 1 is wrong, maybe getGameSpeed ("1")? function freeze() if getGameSpeed = 1 local name = getPlayerName(source) setGameSpeed(0) outputChatBox(name.." has froze all players!", source, 255,0,0) elseif getGameSpeed = 0 outputChatBox("All players are already frozen!", thePlayer, 255,0,0) end end addCommandHandler("freezeall", freeze) function unfreeze() if getGameSpeed = 0 local name = getPlayerName(source) setGameSpeed(0) outputChatbox(name.." has unfroze all players!",source,0,255,0) elseif getGameSpeed = 1 outputChatBox("Players are not frozen!",thePlayer,0,255,0) end end addCommandHandler("unfreezeall", unfreeze)
-
Thanks man, i always liked your [FUN]Dodge
-
WOW, THANKS MAN, TROLL LOL
-
Ok, . But is there any thing i can use to archive what i want?
-
Hello all, i require some help, i was roaming through the freeroam script could not help but find this: addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) Well i am not a good scripter, but if i believe this is the source of the outputs in chat, for an example, i wanted to put the ACL group before the name (ADMIN) (MODERATOR) (SUPER MODERATOR) I looked through the wiki and found this aclGetGroup, but is it possible to put in the code. So aclGetGroup(source) would be before getplayername(source). addEventHandler('onPlayerChat', g_Root, function(msg, type) if type == 0 then cancelEvent() local r, g, b = getPlayerNametagColor(source) outputChatBox(aclGetGroup(source) .. getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), g_Root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) But when i do it, it disables the chat completely, i assume maybe i am inserting it wrongly. Could someone please direct me?