-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
dxDrawImage dxDrawLine dxDrawText dxDrawRectangle
-
use /debugscript 3 tell us the error and post the whole code
-
function buttonPick() if source == Button_VS_sn then if isPedInVehicle(localPlayer) then local v = getPedOccupiedVehicle(localPlayer) local x, y, z = getElementPosition(v) local vehicleZoneName = getZoneName(x, y, z) guiSetText(label_Zone, "", tostring(vehicleZoneName)) end end end addEventHandler("onClientGUIClick", guiRaoot, buttonPick)
-
function buttonPick(v) if button == "left" and state == "down" then if source == Button_VS_sn then if isElement(v) and getElementType(v) == "vehicle" then local x, y, z = getElementPosition(v) local vehicleZoneName = getZoneName(x, y, z) guiSetText(label_Zone, "", tostring(vehicleZoneName)) end end end end addEventHandler("onClientGUIClick", root, buttonPick)
-
show all code and put it in tag lua thanks
-
function buttonPickup(theVehicle) if isElement(theVehicle) and getElementType(theVehicle) == "vehicle" then local x, y, z = getElementPosition(theVehicle) local vehicleZoneName = getZoneName(x, y, z) guiSetText(zonexad, "Veh Zone: ", vehicleZoneName) end end
-
What exacly want the scoreboard to have also here we are help you with the code not make it for you
-
any error in /debugscript 3?
-
function replaceModel() txd = engineLoadTXD("feltzer.txd", 415 ) engineImportTXD(txd, 415) dff = engineLoadDFF("feltzer.dff", 415 ) engineReplaceModel(dff, 415) end addEventHandler ( "onClientResourceStart", resourceRoot, replaceModel) addCommandHandler ( "refreshmodels", replaceModel )
-
wrong section post here
-
no there isn't setElementPosition
-
addEventHandler("onPlayerLogin", root function() bindKey(source, "mouse2", "down", createAndFire) end ) addEventHandler("onResourceStart", resourceRoot, function() for _, v in ipairs(getElementsByType("player")) do bindKey(v, "mouse2", "down", createAndFire) end end ) local weapon = createWeapon("ak47", 0, 0, 1 ) local weapon2 = createWeapon("ak47", 0, 0, 1 ) setElementAlpha ( weapon, 0) setElementAlpha ( weapon2, 0) local weaponINV = createWeapon("ak47", 0, 0, 1 ) local weapon2INV = createWeapon("ak47", 0, 0, 1 ) function createAndFire(thePlayer) local theVehicle = getPedOccupiedVehicle (thePlayer ) if theVehicle then local x,y,z = getElementPosition ( theVehicle ) local rX,rY,rZ = getElementRotation(theVehicle) attachElements ( weapon, theVehicle, 1, 2, 0, 0, 0, 90 ) attachElements ( weapon2, theVehicle, -1, 2, 0, 0, 0, 90 ) attachElements ( weaponINV, theVehicle, 1, 2, 0, 0, 0, 95 ) attachElements ( weapon2INV, theVehicle, -1, 2, 0, 0, 0, 95 ) fireWeapon(weapon) fireWeapon(weapon2) end end addEventHandler("onResourceStart", resourceRoot, createAndFire)
-
addEventHandler("onClientGUIClick", GUIEditor.button[1], function() setElementData(localPlayer, "anti.repeater", true) if ( getElementData(localPlayer, "anti.repeater") == true ) then timer[source] = setTimer( function() guiSetProperty( GUIEditor.button[1], "Disabled", "False" ) setElementData(localPlayer, "anti.repeater", false) removeEventHandler("onClientGUIClick", GUIEditor.button[1], cancelShots) end, 10000, 1 ) addEventHandler("onClientGUIClick", GUIEditor.button[1], cancelShots) end end) function cancelShots() if source == GUIEditor.button[1] then guiSetProperty( GUIEditor.button[1], "Disabled", "False" ) else guiSetProperty( GUIEditor.button[1], "Disabled", "True" ) end end
-
Clinet function location() local x, y, z = getElementPosition(localPlayer) end addEvent("area", true) addEventHandler("area", localPlayer, location) Server function playerArea(thePlayer, x, y, z, _) triggerClientEvent(root, "area", root, x, y, z) outputChatBox("The Player is on"..x.." "..y.." "..z.., thePlayer, 255, 255, 0) end addCommandHandler("loc", playerArea)
-
Example local ranks = { ["Fireman"] = { {"Level1", 1}, {"Level2", 2}, {"Level3", 3}, {"Level4", 4} } } function rankSet() for _, v in ipairs (ranks) do --code what you want end end
-
Client case = createObject(3026, 0, 0, 0) --(object attachto, bone, x, y, z, rx, ry, rz) addEvent("backpack", true) addEventHandler("backpack", localPlayer, function() -- Local Player exports.bone_attach:attachElementToBone(case, localPlayer, 5, 0, -0.4, 0.02, 0, 0, 80, 1) --Optimized for backpack exports.global:applyAnimation(localPlayer, "goggles", "goggles_put_on", 1000) --Added animation if player put backpack end ) addEvent("backpackoff", true) addEventHandler("backpackoff", localPlayer, function() exports.bone:detachElementFromBone(case) exports.global:applyAnimation(localPlayer, "goggles", "goggles_put_on", 1000) --Added animation if player put off the backpack moveObject(case, 1, 0, 0, 0) end ) Server addCommandHandler("backpack", function() triggerClientEvent("backpack", root, case) end ) addCommandHandler("backpackoff", function() triggerClientEvent("backpackoff", root, removebriefcase) end )
-
function getPlayerFromPatrialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function jailTrunk(thePlayer, targetPlayer, _) if targetPlayer then if (getPlayerFromPatrialName(targetPlayer)) then targetPlayer(getPlayerFromPatrialName(targetPlayer)) if targetPlayer ~= thePlayer then if isPedInVehicle(thePlayer) then local theVehicle = getPedOccupiedVehicle(thePlayer) warpPedIntoVehicle(targetPlayer, theVehicle, 4) end end end end end addCommandHandler("tjail", jailTrunk) jailTime = setTimer(jailTrunk, 5000, 1) function unjailedTurnk(thePlayer, targetPlayer) killTimer(jailTime) if getTimerDetails(jailTime) == 0 then if targetPlayer then if (getPlayerFromPatrialName(targetPlayer)) then targetPlayer(getPlayerFromPatrialName(targetPlayer)) removePedFromVehicle(targetPlayer) end end end end
-
dxDrawText(""..tostring(getElementData(getLocalPlayer(),"pvpmoney")).."", 1150*sW,530*sH,1150*sW,562*sH,tocolor(0,150,150,255), sH*1, "arial", "center", "center", false, false, true,false,false)
-
no its not is both
-
use debugscript 3 and see what error makes also put whole code
-
function onLogin(thePreviousAccount, theCurrentAccount, autoLogin) if ~= (isGuestAccount(getPlayerAccount(source))) then local playerHealth = getAccountData(theCurrentAccount, "s.health") setElementHealth(source, playerHealth) 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.health", tostring(getElementHealth(source))) end end end addEventHandler("onPlayerQuit", root, onQuit)
-
so what you want save in accounts?
-
y is the high so no x maybe change