-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
just copy the code and add tags lua /lua
-
addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) local x, y, z = getElementPosition(theVehicle) if (success) then if getElementType("trailer") then setElementPosition(trailer, x+2, y, z) end outputChatBox("Trailer detached!", thePlayer) else outputChatBox("Trailer not attatched.", thePlayer) end end end addCommandHandler("unhook", unhookTrailer)
-
use /debugscript 3 and see if there is any erors
-
go here press edit and add [lua@]/lua] remove the @ in lua
-
addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if (isPedInVehicle(thePlayer)) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) if (success) then outputChatBox("Traller detached!", thePlayer) else outputChatBox("Traller not attatched.". thePlayer) end end end addCommandHandler("unhook", unhookTrailer) try that
-
addEvnetHandler("onClientPlayerChnageNick", localPlayer, function(oldNick, newNick) outputChatBox(oldNick..."is known as"..newNick) end )
-
addEventHandler("onPlayerLogin", root, function() bindKey(source, "o", "up", unhookTrailer) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v ipairs(getElementsByType("player")) do bindKey(v, "o", "up", unhookTrailer) end end ) function unhookTrailer(thePlayer, commandName) if (thePlayer and isPedInVehicle(thePlayer)) then local theVehicle = getPedOccupiedVehicle(thePlayer) local success = detachTrailerFromVehicle(theVehicle) if (success) then outputChatBox("Traller detached!", thePlayer) else outputChatBox("Traller not attatched.". thePlayer) end end end addCommandHandler("unhook", unhookTrailer)
-
function onLogin(thePreviousAccount, theCurrentAccount, autoLogin) if ~= (isGuestAccount(getPlayerAccount(source))) then local playerskin = getAccountData(theCurrentAccount, "s.skin") setElementModel(source, playerskin) end end addEventHandler("onPlayerLogin", root, onLogin) function onQuit(quitType, reason, resposibleElement) if ~=(isGuestAccount(getPlayerAccount(source))) then local account = getPlayerAccount(source) if account then setAccountData(account, "s.skin", tostring(getPedSkin(source))) end end end addEventHandler("onPlayerQuit", root, onQuit)
-
omg i didn't see the client
-
no problem mate
-
change local accountAdded = addAccount(tostring(username),tostring(password)) to local accountAdded = addAccount(username, password)
-
addEventHandler("onPlayerDamage", root, function(wp) if wp == 54 then cancelEvent() end end) <meta> <script src"server.lua" type="server"/> </meta>
-
So you want a script save the player skin?
-
can post all code see why that happening
-
addEventHandler("onClientPlayerDamage", root, function(wp) if wp == 54 then cancelEvent() end end )
-
max = 0 addEventHandler("onPlayerWasted", root, function() for _, player in ipairs(getElementsByType("player")) do if (murder > max ) then setElementData(player, "Kills", murder) end getElementData(player, "Kills") end end )
-
function broadcast() local sound = playSound("music") setSoundVolume(sound, 1.0) end in music put the mp3 name and path for example if the song is inside a folder named sounds you put sounds/.mp3 that it
-
function onEnter(thePlayer) local x, y, z = getElementPosition(thePlayer) setElementPosition(thePlayer, -2422.1469, -607.8954, 132.56) setElementFrozen(thePlayer, true) end addEvent("check", true) addEventHandler("check", getRootElement(), onEnter) function bind() bindKey(source, "e", "down", onEnter) end addEventHandler("onPlayerLogin", getRootElement(), bind) function binds() for i, v in ipairs(getElementsByType("player")) do bindKey(v, "e", "down", onEnter) end end addEventHandler("onResourceStart", getResourceRootElement(getThisResource()), binds) I wrote everything in server side
-
function binds() bindKey(key, state, onWaste) end addEventHandler("onClientResourceStarts", getResourceRootElement(getThisResource()), binds) function onWaste() setElementPosition(localPlayer, x, y, z) end addEventHandler("onClientPlayerWasted", getRootElement(), onWaste) that is more les in client side if you wanrt it in server side just tell me key state and position you choose
-
function binds() bindKey("f", "down", onEnter) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), binds) function onEnter(posX, posY, posZ) local x, y, z = getElementPosition(localPlayer) setElementPosition(localPlayer, -2422.1469, -607.8954, 132.56) end
-
function showHud() showPlayerHudComponent(source, "radar", true) end addEventHandler("onPlayerLogin", getRootElement(), showHud) function hideHud() showPlayerHudComponent(source, "radar", false) end addEventHandler("onPlayerConnect", getRootElement(), hideHud)
-
function passwordHandler(thePlayer, newpassword) local account = getPlayerAccount(thePlayer) local nCuenta = getAccountName(account) if (account) then if (isGuestAccount(account)) then exports.SAEGMessages:sendClientMessage("[sERVER] Please log in to change the password.", thePlayer, 255, 255, 255, true) else setAccountPassword(account, newpassword) exports.SAEGMessages:sendClientMessage("[sERVER] The account password has been change.", thePlayer, 255, 255, 255, true) exports.SAEGMessages:sendClientMessage["[ACCOUNT][uSER:"..nCuenta.."] - [NEW PASSWORD:"..newpassword.."].", thePlayer, 255, 255, 255, true) end end end addEvent("Cambiar", true) addEventHandler("Cambiar", getRootElement(), passwordHandler)
-
yea because its for mtasa 1.3 not 1.5