-
Posts
37 -
Joined
-
Last visited
Posts posted by Ekko
-
-
Hey, where i put libmysqlclient.so.16 if i dont have /usr/lib
i tried to create usr/lib inside x64 wont work. -
Hello i need help in this script pls , problem
WARNING: anno\main.lua:971: Bad argument @ 'dxCreateTexture' [Expected elemant at argument 1, got boolean]
WARNING: anno\main.lua:972: Bad argument @ 'dxConvertPixels' [Expected elemant at argument 1, got boolean]
this is a part of the script
addEvent("onTakeScreen", true) addEventHandler("onTakeScreen", root, function(pixels) PlayerTexture = dxCreateTexture(pixels) PlayerPixels = dxConvertPixels(pixels, "png") AddScreenLabel:setEnabled(true) AddScreenLabel:setText("To take a photo") end)
-
hello is there is a way to fix this glitch ?? https://prnt.sc/lgw9b8
-
Hello i need help on ifp demo script , i want to make it dont repeat the animation because the small animations repeat so fast and some times some of them moving while repeating this is the client side :
local animationManagerWindow = nil local replaceAnimationLabel, playAnimationLabel = nil, nil local restoreDefaultsButton, stopAnimationButton = nil, nil local replaceAnimationGridList, playAnimationGridList = nil, nil local isShowingAnimationBlocksInPlayGridList = true local currentBlockNameSelected = nil local isLocalPlayerAnimating = false local function PopulatePlayAnimationGridListWithBlocks () isShowingAnimationBlocksInPlayGridList = true currentBlockNameSelected = nil guiGridListClear ( playAnimationGridList ) -- Add IFP blocks to the play animation gridlist for customAnimationBlockIndex, customAnimationBlock in ipairs ( globalLoadedIfps ) do local rowIndex = guiGridListAddRow ( playAnimationGridList, " + "..customAnimationBlock.friendlyName ) guiGridListSetItemData ( playAnimationGridList, rowIndex, 1, customAnimationBlockIndex ) end end local function PopulatePlayAnimationGridListWithCustomBlockAnimations ( ifpIndex ) isShowingAnimationBlocksInPlayGridList = false currentBlockNameSelected = globalLoadedIfps [ifpIndex].blockName guiGridListClear ( playAnimationGridList ) guiGridListAddRow ( playAnimationGridList, ".." ) -- Add IFP blocks to the play animation gridlist for _, customAnimationName in ipairs ( globalLoadedIfps [ifpIndex].animations ) do local rowIndex = guiGridListAddRow ( playAnimationGridList, " "..customAnimationName ) guiGridListSetItemData ( playAnimationGridList, rowIndex, 1, customAnimationName ) end end addEventHandler("onClientResourceStart", resourceRoot, function() triggerServerEvent ( "onCustomAnimationSyncRequest", resourceRoot, localPlayer ) outputChatBox ("Press 'X' to toggle Animation Manager", 255, 255, 255) animationManagerWindow = guiCreateWindow(118, 116, 558, 371, "Ekko's Animations", false) guiWindowSetSizable(animationManagerWindow, false) guiSetVisible ( animationManagerWindow, false ) replaceAnimationLabel = guiCreateLabel(12, 26, 245, 19, "Replace Animations With", false, animationManagerWindow) guiSetFont(replaceAnimationLabel, "default-bold-small") guiLabelSetHorizontalAlign(replaceAnimationLabel, "center", false) replaceAnimationGridList = guiCreateGridList(12, 49, 245, 255, false, animationManagerWindow) guiGridListAddColumn(replaceAnimationGridList, "Animation Blocks", 0.9) stopAnimationButton = guiCreateButton(329, 314, 174, 41, "Stop Animation", false, animationManagerWindow) playAnimationGridList = guiCreateGridList(294, 49, 245, 255, false, animationManagerWindow) guiGridListAddColumn(playAnimationGridList, "Animation Blocks", 0.9) -- load IFP files and add them to the play animation gridlist for customAnimationBlockIndex, customAnimationBlock in ipairs ( globalLoadedIfps ) do local ifp = engineLoadIFP ( customAnimationBlock.path, customAnimationBlock.blockName ) if not ifp then outputChatBox ("Failed to load '"..customAnimationBlock.path.."'") end end -- now add replaceable ifps to the other grid list for _, ifpIndex in ipairs ( globalReplaceableIfpsIndices ) do local customAnimationBlock = globalLoadedIfps [ ifpIndex ] local rowIndex = guiGridListAddRow ( replaceAnimationGridList, customAnimationBlock.friendlyName ) guiGridListSetItemData ( replaceAnimationGridList, rowIndex, 1, ifpIndex ) end PopulatePlayAnimationGridListWithBlocks () end ) local function ReplacePedBlockAnimations ( player, ifpIndex ) local customIfpBlockName = globalLoadedIfps [ ifpIndex ].blockName for _, animationName in pairs ( globalPedAnimationBlock.animations ) do -- make sure that we don't replace a partial animation if not globalPedAnimationBlock.partialAnimations [ animationName ] then engineReplaceAnimation ( player, "ped", animationName, customIfpBlockName, animationName ) end end end local function HandleReplacedAnimationGridListDoubleClick () local replacedAnimGridSelectedRow, replacedAnimGridSelectedCol = guiGridListGetSelectedItem ( replaceAnimationGridList ); if replacedAnimGridSelectedRow and replacedAnimGridSelectedRow ~= -1 then local ifpFriendlyName = guiGridListGetItemText( replaceAnimationGridList, replacedAnimGridSelectedRow, replacedAnimGridSelectedCol ) local ifpIndex = guiGridListGetItemData(replaceAnimationGridList, replacedAnimGridSelectedRow, replacedAnimGridSelectedCol ) ReplacePedBlockAnimations ( localPlayer, ifpIndex ) triggerServerEvent ( "onCustomAnimationReplace", resourceRoot, localPlayer, ifpIndex ) outputChatBox ("Replaced 'ped' block animations with '"..ifpFriendlyName.."'", 255, 255, 255) end end local function HandlePlayAnimationGridListDoubleClick () local playAnimGridSelectedRow, playAnimGridSelectedCol = guiGridListGetSelectedItem ( playAnimationGridList ); if playAnimGridSelectedRow and playAnimGridSelectedRow ~= -1 then local itemText = guiGridListGetItemText( playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) if isShowingAnimationBlocksInPlayGridList then local ifpIndex = guiGridListGetItemData(playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) PopulatePlayAnimationGridListWithCustomBlockAnimations ( ifpIndex ) else if itemText == ".." then PopulatePlayAnimationGridListWithBlocks ( ) else local animationName = guiGridListGetItemData(playAnimationGridList, playAnimGridSelectedRow, playAnimGridSelectedCol ) setPedAnimation ( localPlayer, currentBlockNameSelected, animationName ) triggerServerEvent ( "onCustomAnimationSet", resourceRoot, localPlayer, currentBlockNameSelected, animationName ) isLocalPlayerAnimating = true end end end end addEventHandler( "onClientGUIDoubleClick", resourceRoot, function ( button, state, absoluteX, absoluteY ) if button == "left" and state == "up" then if source == replaceAnimationGridList then HandleReplacedAnimationGridListDoubleClick ( ) elseif source == playAnimationGridList then HandlePlayAnimationGridListDoubleClick ( ) end end end ) addEventHandler( "onClientGUIClick", resourceRoot, function ( button, state ) if button == "left" and state == "up" then if source == restoreDefaultsButton then -- restore all replaced animations of "ped" block engineRestoreAnimation ( localPlayer, "ped" ) triggerServerEvent ( "onCustomAnimationRestore", resourceRoot, localPlayer, "ped" ) outputChatBox ("Restored ped block animations", 255, 255, 255) elseif source == stopAnimationButton then setPedAnimation ( localPlayer, false ) triggerServerEvent ( "onCustomAnimationSet", resourceRoot, localPlayer, false, false ) end end end ) bindKey ( "X", "down", function ( key, keyState ) if ( keyState == "down" ) then local isAnimationMangerWindowVisible = guiGetVisible ( animationManagerWindow ) guiSetVisible ( animationManagerWindow, not isAnimationMangerWindowVisible ) showCursor ( not isAnimationMangerWindowVisible ) end end ) addEvent ("onClientCustomAnimationSyncRequest", true ) addEventHandler ("onClientCustomAnimationSyncRequest", root, function ( playerAnimations ) for player, anims in pairs ( playerAnimations ) do if isElement ( player ) then if anims.current then setPedAnimation ( player, anims.current[1], anims.current[2] ) end if anims.replacedPedBlock then ReplacePedBlockAnimations ( player, anims.replacedPedBlock ) end end end end ) addEvent ("onClientCustomAnimationSet", true ) addEventHandler ("onClientCustomAnimationSet", root, function ( blockName, animationName ) if source == localPlayer then return end if blockName == false then setPedAnimation ( source, false ) return end setPedAnimation ( source, blockName, animationName ) end ) addEvent ("onClientCustomAnimationReplace", true ) addEventHandler ("onClientCustomAnimationReplace", root, function ( ifpIndex ) if source == localPlayer then return end ReplacePedBlockAnimations ( source, ifpIndex ) end ) addEvent ("onClientCustomAnimationRestore", true ) addEventHandler ("onClientCustomAnimationRestore", root, function ( blockName ) if source == localPlayer then return end engineRestoreAnimation ( source, blockName ) end ) setTimer ( function () if isLocalPlayerAnimating then if not getPedAnimation (localPlayer) then isLocalPlayerAnimating = false triggerServerEvent ( "onCustomAnimationStop", resourceRoot, localPlayer ) end end end, 100, 0 )
-
did you found the solution ?
On 28/07/2018 at 15:23, Snakegold said:Guys i wan't to ask you how to change some wps shoot from a long distance
and how to change wp crosshair i mean when i shoot it keep in the same size
exmpl:
-
Hey i wanto to change the siterocket with this png help me pls .https://image.ibb.co/iPwuAA/rocket.png
-
9 minutes ago, Dimos7 said:
marker = {} marker[1] = createMarker(1906.501953125, -2294.4736328125, 13.75768661499, "corona", 1.5, 100, 0, 100, 100) setElementInterior(marker[1], 56) setElementDimension (marker[1], 44 ) function TelePort(Element, hitElement) for k, v in ipairs(getAttachedElements(Element)) do setElementInterior(v, 0) setElementDimension(v, 0) setElementInterior(Element, 0) setElementDimension (Element, 0) setElementInterior(hitElement, 0) setTimer(setElementInterior, 10, 1, Element, 0) setTimer(setElementInterior, 10, 1, hitElement, 0) setElementPosition(Element, 1335.4150390625, 446.3466796875, 20.284374237061, true) setElementFrozen(Element, true) setTimer(setElementFrozen, 1000, 1,Element, false) setElementRotation ( Element, 0, 0, 248.84687805176 ) end end addEventHandler("onMarkerHit",marker[1], function (player) if getElementType(player)=="player" then local vehicle = getPedOccupiedVehicle(player) if vehicle then local pTeam = getPlayerTeam(player) if pTeam and getTeamName(pTeam) == 'Gendarmerie Royale' then TelePort(vehicle, player) return end outputChatBox ('You are not in this Faction!',player, 255, 0, 0 ) else outputChatBox ('You need to be in Vehicle to enter this Garage!',player, 255, 0, 0 ) end end end)
try something like this
thanks man it work perfectly your the best
-
1 hour ago, Dimos7 said:
go to tp script and do getAttachedElements and make it go with the element go to interior
when i add it specifically pls her is the tp
marker = {} marker[1] = createMarker(1906.501953125, -2294.4736328125, 13.75768661499, "corona", 1.5, 100, 0, 100, 100) setElementInterior(marker[1], 56) setElementDimension (marker[1], 44 ) function TelePort(Element, hitElement) setElementInterior(Element, 0) setElementDimension (Element, 0) setElementInterior(hitElement, 0) setTimer(setElementInterior, 10, 1, Element, 0) setTimer(setElementInterior, 10, 1, hitElement, 0) setElementPosition(Element, 1335.4150390625, 446.3466796875, 20.284374237061, true) setElementFrozen(Element, true) setTimer(setElementFrozen, 1000, 1,Element, false) setElementRotation ( Element, 0, 0, 248.84687805176 ) end addEventHandler("onMarkerHit",marker[1], function (player) if getElementType(player)=="player" then local vehicle = getPedOccupiedVehicle(player) if vehicle then local pTeam = getPlayerTeam(player) if pTeam and getTeamName(pTeam) == 'Gendarmerie Royale' then TelePort(vehicle, player) return end outputChatBox ('You are not in this Faction!',player, 255, 0, 0 ) else outputChatBox ('You need to be in Vehicle to enter this Garage!',player, 255, 0, 0 ) end end end)
-
5 hours ago, Dimos7 said:
function undercover (player) local vehicle = getPedOccupiedVehicle(player) local id = getElementModel(vehicle) local siren = getElementData(vehicle, "siren") if isPedInVehicle(player) then if id == 560 then if not siren then local Object = createObject(1668,5,5,5) attachElements ( Object, vehicle, -0.4, 0.5, 0.868 ) setElementData(vehicle, "siren", true) setElementInterior(Object, getElementInterior(vehicle)) setElementDimension(Object, getElementDimension(vehicle)) else for i,v in ipairs (getAttachedElements(vehicle) ) do detachElements (v, vehicle) setElementData(vehicle, "siren", false) end end end end end addCommandHandler("taxion",undercover)
This should work
the object still dont show inside the garage (dimension/interior)
-
1 minute ago, Dimos7 said:
What do you mean?
i mean when i enter an elevator to tp to a garage the object disappear
-
4 minutes ago, Dimos7 said:
function undercover (player) local vehicle = getPedOccupiedVehicle(player) local id = getElementModel(vehicle) local siren = getElementData(vehicle, "siren") if isPedInVehicle(player) then if id == 560 then if not siren then local Object = createObject(1668,5,5,5) attachElements ( Object, vehicle, -0.4, 0.5, 0.868 ) setElementData(vehicle, "siren", true) else for i,v in ipairs (getAttachedElements(vehicle) ) do detachElements (v, vehicle) setElementData(vehicle, "siren", false) end end end end end addCommandHandler("taxion",undercover)
Try this
damn you are so good wow , can you make it when i enter elevetor the object dont disappear pls !! ?
-
13 hours ago, LyricalMM said:
function undercover (player) local vehicle = getPedOccupiedVehicle(player) local id = getElementModel(vehicle) local siren = getElementData(vehicle, "siren") if isPedInVehicle(player) then if id == 560 then if not siren then local Object = createObject(1668,5,5,5) attachElements ( Object, vehicle, -0.4, 0.5, 0.868 ) setElementData(vehicle, "siren", true) else local attachedElements = #getAttachedElements (vehicle) for i,v in ipairs (attachedElements) do detachElements (v, vehicle) setElementData(vehicle, "siren", false) end end end end end addCommandHandler("taxion",undercover)
try this
or you can make a function to getVehicleByType, then make a db reference
didn't work
-
-
7 hours ago, #\_oskar_/# said:
explain a want to do !?
i want a guiClick to stop the first script , the fist script is a video starts when player join the server i want when the player click the gui button he skip it (stop it) so he can select his character and spawning pls help me
-
--[[ Usefull functions: executeBrowserJavascript(theBrowser, 'document.getElementById("demo").innerHTML = "' .. msg ..'"') ]] local screenWidth, screenHeight = guiGetScreenSize() -- local page = "http://mta/html-login-panel/html/login.html" local page = "http://mta/html-login-panel/index.html" local initBrowser = guiCreateBrowser(0, 0, screenWidth, screenHeight, true, false, false) local theBrowser = guiGetBrowser(initBrowser) addEventHandler("onClientBrowserCreated", theBrowser , function() loadBrowserURL(source, page) showCursor(true) end ) addEvent("onClientPlayerLogin", true) addEventHandler("onClientPlayerLogin", root, function() destroyElement(initBrowser) showCursor(false) end ) function cmsg(login, password, command) if (command == "login") then triggerServerEvent("login", resourceRoot, login, password) elseif (command == "register") then triggerServerEvent("register", resourceRoot, login, password) end end addEvent("cmsg", true) addEventHandler("cmsg", root, cmsg) -- addEventHandler("onClientRender", root, -- function() -- dxDrawImage(screenWidth*0.205,screenHeight*0.15,1890/2.5,1417/2.5,"Test.png", 0,0,0,tocolor(255,255,255,255),true) -- end -- ) end end
Hello i'm trying to make Gui button that stop this script after he start this is the button gui
GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.button[1] = guiCreateButton(559, 700, 268, 58, "Click Her to Select Your Character", false) guiSetAlpha(GUIEditor.button[1], 0.88) guiSetFont(GUIEditor.button[1], "clear-normal") guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFEFF806") end )
pls help i tried like 4h testing codes
-
8 minutes ago, Dimos7 said:
show us what you did
deleted all what i did it wont work so i decided to do some thing stupid i'm gonna use 2 login panels in my server , the first one for the design i'm trying now to add a Gui button to stop it after the player log in with the secend login panel
-
5 minutes ago, #\_oskar_/# said:
use dbConnect or executeSQLQuery
i did my best to fix it i couldn't bro i need some one to fix it for me
-
Server-side
function onServerRegister ( player, email, password, code ) local accountAdded = addAccount( email, password ) if ( accountAdded) then logIn( player, accountAdded, password ) triggerClientEvent( player, "onCommand", player, "reg_success" ) if ( code and type(code) == "number" and #code == 4 ) then setAccountData( accountAdded, "Secret Code", code ) else setAccountData( accountAdded, "Secret Code", "none" ) end local time = getRealTime() local hours = time.hour local minutes = time.minute local second = time.second local year = time.year+1900 local month = time.month+1 local day = time.monthday local ymdhms = ( year.."-"..month.."-"..day.." "..hours..":"..minutes..":"..second ) setAccountData( accountAdded, "Register Date", ymdhms ) local userid = #getAccounts() setAccountData( accountAdded, "UID", userid + 1 ) outputChatBox( "ท่านลงทะเบียน สำเร็จแล้ว / ข้อมูลของท่านคือ", player, 255, 255, 255, true) outputChatBox( "#FF0000Email: #A6A6A6" .. email, player, 255, 255, 255, true) outputChatBox( "#FF0000Password: #A6A6A6" .. email, player, 255, 255, 255, true) else triggerClientEvent( player, "onCommand", player, "reg_error" ) end end addEvent( "onServerRegister", true ) addEventHandler( "onServerRegister", root, onServerRegister ) function onServerLogin ( player, email, password, checked ) local account = getAccount( email, password ) if ( account) then logIn( player, account, password ) triggerClientEvent( player, "onCommand", player, "login_success", checked, email, password ) setElementData( player, "Secret Code", getAccountData( account, "Secret Code" ) ) setElementData( player, "Register Date", getAccountData( account, "Register Date" ) ) setElementData( player, "UID", getAccountData( account, "UID" ) ) outputChatBox( "ยินดีต้อนรับ เข้าสู่เซิฟร์เวอร์", player, 255, 255, 255, true) else triggerClientEvent( player, "onCommand", player, "login_error" ) end end addEvent( "onServerLogin", true ) addEventHandler( "onServerLogin", root, onServerLogin )
Hello this is a login panel server side help me pls to connect it with MYSQL
-
1 minute ago, IIYAMA said:
getAttachedElements (vehicle)
This returns a table with attached elements.
#table
# gets the length of a table.
value > 0
This returns true or false depending if the value is higher than 0.
local serin = result
This saves the result in to serin.
Ok man but i tryied the code at all 24 lanes didn't work i dont know what to do now
-
17 minutes ago, IIYAMA said:
A very quick and basic solution, would be:
local siren = #getAttachedElements (vehicle) > 0
Place it where you think it would make sense in your code.
And if you do not know where to place it, you can always try it at all 24 lines till the code finally does what you want...
i did like you said it didn't work explain more pls
-
local siren = false function undercover (player) local vehicle = getPedOccupiedVehicle(player) local id = getElementModel(vehicle) if isPedInVehicle(player) then if id == 560 then if siren == false then local Object = createObject(1668,5,5,5) attachElements ( Object, vehicle, -0.4, 0.5, 0.868 ) siren = true elseif siren == true then local attachedElements = getAttachedElements (vehicle) for i,v in ipairs (attachedElements) do detachElements (v, vehicle) siren = false end end end end end addCommandHandler("taxion",undercover)
Hello basically this script attach taxi sing in vehicle ID 560 but the problem just one can use it in the server pls help me , make it many players can use it
-
3 minutes ago, Dimos7 said:
marker = {} marker[1] = createMarker(1075.7607421875, -1287.2705078125, 79.064178466797, "corona", 3.5, 255, 255, 0, 255) setElementInterior(marker[1], 1) setElementDimension (marker[1], 36 ) function TelePort(Element, hitElement) setElementInterior(Element, 0) setElementDimension (Element, 0) setElementDimension(hitElement, 0) setTimer(setElementInterior, 10, 1, Element, 0) setTimer(setElementInterior, 10, 1, hitElement, 0) setElementPosition(Element, 1230.5107421875, 302.2041015625, 19.619340896606, true) setElementFrozen(Element, true) setTimer(setElementFrozen, 1000, 1,Element, false) end addEventHandler("onMarkerHit",marker[1], function (player) if getElementType(player)=="player" then local vehicle = getPedOccupiedVehicle(player) if vehicle then local pTeam = getPlayerTeam(player) if pTeam and getTeamName(pTeam) == 'Gendarmerie Royale' then TelePort(vehicle, player) return end outputChatBox ('You are not in a team',player, 255, 0, 0 ) else outputChatBox ('You do not have a Vehicle!',player, 255, 0, 0 ) end end end)
hmm i see dimension of player not be in code so i dd it
thanks so much i changed the lane that you added from setElementDimension(hitElement, 0) to setElementInterior(hitElement, 0) worked good
-
14 minutes ago, Dimos7 said:
np
marker = {} marker[1] = createMarker(1075.7607421875, -1287.2705078125, 79.064178466797, "corona", 3.5, 255, 255, 0, 255) setElementInterior(marker[1], 1) setElementDimension (marker[1], 36 ) function TelePort(Element, hitElement) setElementInterior(Element, 0) setElementDimension (Element, 0 ) setTimer(setElementInterior, 10, 1, Element, 0) setTimer(setElementInterior, 10, 1, hitElement, 0) setElementPosition(Element, 1230.5107421875, 302.2041015625, 19.619340896606, true) setElementFrozen(Element, true) setTimer(setElementFrozen, 1000, 1,Element, false) end addEventHandler("onMarkerHit",marker[1], function (player) if getElementType(player)=="player" then local vehicle = getPedOccupiedVehicle(player) if vehicle then local pTeam = getPlayerTeam(player) if pTeam and getTeamName(pTeam) == 'Gendarmerie Royale' then TelePort(vehicle, player) return end outputChatBox ('You are not in a team',player, 255, 0, 0 ) else outputChatBox ('You do not have a Vehicle!',player, 255, 0, 0 ) end end end)
Hey sorry for asking to much i'm trying to do the opposite , tp from interior to outside i modified the code : the car tp well to the dimension 0 , interior 0 but the player tp to the dimensen 0 , interior 1 . help pls
-
16 hours ago, Dimos7 said:
marker = {} marker[1] = createMarker(1217.0947265625, 357.6181640625, 19.413511276245, "corona", 3.5, 255, 255, 0, 255) function TelePort(Element, hitElement) setElementInterior(Element, 1) setElementDimension (Element, 36 ) setTimer(setElementInterior, 1000, 1, Element, 1) setTimer(setElementInterior, 1000, 1, hitElement, 1) setElementPosition(Element, 1099.146484375, -1300.3564453125, 79.0625, true) setElementFrozen(Element, true) setTimer(setElementFrozen, 1000, 1,Element, false) end addEventHandler("onMarkerHit",marker[1], function (player) if getElementType(player)=="player" then local vehicle = getPedOccupiedVehicle(player) if vehicle then local pTeam = getPlayerTeam(player) if pTeam and getTeamName(pTeam) == 'Gendarmerie Royale' then TelePort(vehicle, player) return end outputChatBox ('You are not in a team',player, 255, 0, 0 ) else outputChatBox ('You do not have a Vehicle!',player, 255, 0, 0 ) end end end)
Try this
You are the man tnx alot works good
libmysqlclient.so.16 problems
in Linux-Server
Posted
it doesn't work on my hosted server console .