-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
If he doesn't feel like learning than that's probably the best (and only) option.
-
I've quickly tested the onPlayerWasted with a output and it seems that killer returns false. So this would prevent it, if ( attacker ) then Not 100% sure since I tested by crashing my own car and not being killed by anyone else.
-
Take a look at the Scripting Functions on the bottom of the page and practice those in simpele examples first. https://wiki.multitheftauto.com/wiki/Xml Also if you work with an account system you could use setAccountData
-
You could work for example with createTeam or make our own team system. Then the best way to store the members are SQL or XML (I suggest SQL). Regards Viruz
-
There are quite a few of them, just search road on the community. For example https://community.multitheftauto.com/index.php?p ... s&id=12627 https://community.multitheftauto.com/index.php?p ... ls&id=6803
-
You should do a callRemote() to a webpage and from there a php mail()
-
addEventHandler( "onClientResourceStart", resourceRoot, function() for i,val in ipairs(groups) do perfectname = val.name..""..val.num textures[perfectname] = dxCreateTexture ( val.texture ) shaders[perfectname] = dxCreateShader( val.shader,999999, 0, false, "ped" ) names[perfectname] = val.worldname dxSetShaderValue ( shaders[perfectname], "Tex0", textures[perfectname] ) -- engineApplyShaderToWorldTexture ( shaders[perfectname], val.worldname ) --bit of sanity checking if not shaders[perfectname] then outputDebugString( "Could not create shader. Please use debugscript 3" ) destroyElement( textures[perfectname] ) return elseif not textures[perfectname] then outputDebugString( "loading texture failed" ) destroyElement ( shaders[perfectname] ) tec = nil return end end end ) function groupskinapply(cmd,num) local grp = getElementData(localPlayer,"Group") local perfectname = grp..""..num if grp and grp ~= "" and shaders[perfectname] then if applied[perfectname] then triggerServerEvent("SunApplyToAllServer", root, perfectname, theplayer) applied[perfectname] = nil return end theplayer = localPlayer val = groups[1] applied[perfectname] = true triggerServerEvent("SonApplyToAllServer", root, perfectname, theplayer) exports.dendxmsg:createNewDxMessage("Group Skin : On ",0,255,0) end end addCommandHandler("customskin", groupskinapply) addEvent("onApplyToAllServer", true ) function applyitdude(val, player) bool1 = engineApplyShaderToWorldTexture ( shaders[val], names[val], player ) --- if not bool1 then outputChatBox("CIS <3",255,0,0) end end addEventHandler("onApplyToAllServer", root, applyitdude) addEvent("unApplyToAllServer", true ) function unapplyitdude(val, player) bool1 = engineRemoveShaderFromWorldTexture ( shaders[val], names[val], player ) if not bool1 then outputChatBox("CIS <3",255,0,0) end end addEventHandler("unApplyToAllServer", root, unapplyitdude) Just copy paste it but then in LUA tags.
-
syncRealTime requires 2 arguments h & m (hours & minutes) and the 2 times you use it only one is passed and it is player.
-
your first argument should be the player who gets the command, source is a source of an event in this case source is undefined. If you wouldn't want to use source you should do it clientside since it requires not player argument. You can for example loop through all players, serversided and attach the command too. Most events have the player of cause as the source but always double check the source on the wiki, sometimes it's a vehicle or a marker, ...
-
in what function is this? which event's source.
-
How about this? there might be a better way tho, local resourceTable = getResources() -- get a table of resources for resourceKey, resourceValue in ipairs(resourceTable) do local name = getResourceName(resourceValue) --name.MySQLHost end
-
What I would do tho is this; local maps = {"/ABC/", "/DEF/", "/OEHSHE/", "/HSIUXOP/"} for i, v in pairs(maps) do maps[i] = string.gsub(v, "/", "") end Since I guess the default names aren't needed anymore.
-
No I don't understand but you could just add this to your code if I'm correct. string.gsub(v, "/", "") Argument 1 is the string, 2 is what pattern (what to find), 3 what to make the pattern (in this case nothing)
-
where is mapname defined if you reach line 4?
-
There is no trigger to one of those events from the error, is this the full code or the error perhaps from another script? Show the full error code, with line number and .lua file.
-
You were trying to do something with your rows but didn't access them right. What exactly are you trying to do? what is your script's idea? I also don't know how your table is build up.
-
You don't do anything with this event it needs a handler what function do you want to trigger? addEvent("Zomb_Jump", true) addEventHandler("Zomb_Jump", getRootElement(), functionNameHere)
-
function loadd (source) local account = getAccountName(source) local query = dbQuery ( database ,"SELECT * FROM RGB WHERE Account = ?", account) local result = dbPoll(query, -1) if result then for _, row in ipairs (result) do -- here you can use row or get the column: row["column"] or use a 2nd loop for the column end end end addEventHandler("onPlayerLogin", getRootElement(), loadd) If I'm right tho
-
local myButton = guiCreateButton (574, 55, 95, 20, "Freeze", false, window) addEventHandler("onClientGUIClick", myButton, function () local player = getPlayerFromName(guiGridListGetItemText(grid, guiGridListGetSelectedItem(grid), 1)) outputServerLog("Player name (from grid): "..guiGridListGetItemText(grid, guiGridListGetSelectedItem(grid), 1)) outputServerLog("Player name: "..getPlayerName(player)) if not player then return end triggerServerEvent("freezeplayer",localPlayer) if (isElementFrozen(player)) then guiSetText(myButton, "Unfreeze") else guiSetText(myButton, "Freeze") end end) Try this and see what I says
-
You just filled in the syntax. Can you please learn the basics as people suggested in before. We can help you with the learning proces but don't start with advanced scripts. Try making some outputChatBox's first on Command & Events.
-
addEvent("Zomb_Jump") has to be addEvent("Zomb_Jump", true) If not already
-
Its just a part of code Yes I understand this is part of your code but I need to see rest of it. Where mybutton is declared and where this part of your code is compaired to your declaration.
-
Where is myButton this kinda important and show the function this code is in.
-
change; local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, true ) To; local ups= guiCreateLabel ( 0.45, 0.48, 0.10, 0.04, "", true)