S3Nn4oX
Members-
Posts
20 -
Joined
-
Last visited
Everything posted by S3Nn4oX
-
ty bru I appreciate it, you helped me a lot!.
-
How can i merge 2 tables?, i.e I merge 2 strings with '..' so how do i do that with tables the script works fine i tested it, but it didn't output the text? ty .
-
Don't know, i didn't test it yet
-
Table = { } function test(thePlayer) Table[1] = thePlayer Table[2] = "Has committed suicide" r, g, b = 255, 0, 0 Table[3] = r, g, b killPed(Table[1], Table[1]) outputChatBox(Table[1]..Table[2].."!", root, Table[3], true) end addCommandHandler("suicide", test) I tried to script something with a table, if i want to store addCommandHandler into a table, it is possible, ? Table = { } Command = addCommandHandler("suicide", test) Table[4] = Command function test(thePlayer) Table[1] = thePlayer Table[2] = "Has committed suicide" r, g, b = 255, 0, 0 Table[3] = r, g, b killPed(Table[1], Table[1]) outputChatBox(Table[1]..Table[2].."!", root, Table[3], true) end Table[4] --Or Table[4] = addCommandHandler("suicide", test) I think i understood almost everything , thanks to you !
-
Didn't expect that bro Thanks fam i appreciate it. now i finally know what are tables. the basics but how do i use tables to store MTA elements ?
-
I know that Tables are needed and i'm very bad i don't know what's tables for what they're used for.., can you send me tutorials about it? or you can explain to me by yr self . I always lose my way on lua.org
-
It is possible to attach GUI with dx element?
-
addCommandHandler("group", function(thePlayer) if exports.acl:isPlayerInGroup(thePlayer, "ev") or exports.acl:isPlayerInGroup(thePlayer, "admin") then triggerClientEvent(thePlayer, "createWindow", getRootElement()) triggerClientEvent(thePlayer, "fillagrid", getRootElement()) triggerClientEvent(thePlayer, "fillcgrid", getRootElement()) triggerClientEvent(thePlayer, "fillugrid", getRootElement()) end end ) function addGroup(thePlayer, group) local playerToAdd = getPlayerAccount(thePlayer) if not exports.acl:isPlayerInGroup(playerToAdd, group)then exports.acl:addAccountToGroup(playerToAdd,group) exports.msj:sendMessage("You've been added to: " ..group.. "!", 0, 150, 0,thePlayer) end end addEvent("addPlayerToGroup", true) addEventHandler("addPlayerToGroup", root, addGroup) function removeGroup(thePlayer, group) local playerToRemove = getPlayerAccount(thePlayer) if exports.acl:isPlayerInGroup(playerToAdd, group) then exports.acl:removeAccountFromGroup(playerToRemove,group) exports.msj:sendMessage("You've been removed from: " ..group.. "!", 0, 150, 0,thePlayer) end end addEvent("removePlayerFromGroup", true) addEventHandler("removePlayerFromGroup", root, removeGroup) try this
-
function skindonator(thePlayer) local account = getPlayerAccount (thePlayer) if isGuestAccount(account) then return end if getAccountData(account,"donatorEnabled") == 1 then setElementModel(thePlayer, 150 ) outputChatBox ("Enjoy your premuim skin") else setElementModel(thePlayer, 189 ) end end end addEventHandler("onPlayerLogin",getRootElement(),skindonator) You forgot to define theplayer account
-
What are the functions that i can move a dxtext?
-
Hey guys, https://forum.multitheftauto.com/viewtopic.php?f=108&t=84376 in this link Deki made a dxEditbox how can I getText from the editbox?
-
Can u tell me how to make a team?
-
It's should work now? Client.lua function skinTeam(oldModel, newModel) local players = getElementsByType ( "player" ) for i,thePlayer in ipairs(players) do if newModel == skinID then -- 18 must be filled with your preferred ID if not isPlayerInTeam(thePlayer, "Admin") then -- set your team name cancelEvent() end end end end addEventHandler("onElementModelChange", root, skinTeam) function isPlayerInTeam(player, team) assert(isElement(player) and getElementType(player) == "player", "Bad argument 1 @ isPlayerInTeam [player expected, got " .. tostring(player) .. "]") assert((not team) or type(team) == "string" or (isElement(team) and getElementType(team) == "team"), "Bad argument 2 @ isPlayerInTeam [nil/string/team expected, got " .. tostring(team) .. "]") return getPlayerTeam(player) == (type(team) == "string" and getTeamFromName(team) or (type(team) == "userdata" and team or (getPlayerTeam(player) or true))) end Meta.xml "Skin mod for a group" author="S3Nn4oX" version="1.0.0" type="gamemode" />
-
how i can set Skin ID for this?
-
I can do that script only for 1 time, that if someone in the group he can use it if he isn't so he cant use it, help me
-
Hello guys, i have dff and txd files but i need the script to make Skin mod for 1 team can someone help me?
