-
Posts
226 -
Joined
-
Last visited
-
Days Won
4
Everything posted by Tommy.
-
As he said it did not work I gave him a solution that works with me
-
Try this: charPed[1] = createPed(getElementData(player,"char1skin"),1187,-2034.4,69.007,180) setElementDimension(charPed[1],getElementDimension(player)) setTimer(function () setPedAnimation (charPed[1], "ped", "SEAT_idle", -1, true, false, false ) end, 100, 1) EDIT: here it works
-
Ele deve ter usado um tradutor da china, falou coisa com coisa, kk
-
Boa tarde, Sou scripter e estou disponível, caso ainda precise de um, entre em contato comigo pelo o privado aqui do fórum.
-
Bom eu fiz para o meu server www.inftplay.com se existe alguma maneira de vincular não sei te dizer mas eu fiz uma db propria com MySql.
-
I enter the server it simply crashes (it is not always) but it is quite frequent. error: Version = 1.5.6-release-14734.0.000 Time = Mon Nov 12 20:35:16 2018 Module = C:\Program Files (x86)\MTA San Andreas 1.5.debug\mta\game_sa.dll Code = 0xC0000005 Offset = 0x00055110 EAX=254A4B01 EBX=0028F31C ECX=254A4B08 EDX=0000007C ESI=0028F31C EDI=254A4B00 EBP=1F224330 ESP=0028F2E0 EIP=1F224338 FLG=00010212 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B
-
Try this [client-side] function onClientClick(button, state) if button == "left" and state == "down" then for k, v in ipairs(fegyverek) do if isInBox(screenW * 0.5703, screenH * 0.2700+(elem * 49.5), screenW * 0.0656, screenH * 0.0269) then fegyver = k end end if isInBox(screenW * 0.5703, screenH * 0.2700+(elem * 49.5), screenW * 0.0656, screenH * 0.0269) then if fegyver == 3 then outputChatBox("asd") end end end end addEventHandler("onClientClick", root, onClientClick) function isInBox(xS,yS,wS,hS) local sx,sy = getCursorPosition () local fx,fy = guiGetScreenSize() cursorx,cursory = sx*fx,sy*fy if cursorx > xS and cursorx < xS + wS and cursory > yS and cursory < yS + hS then return true else return false end end EDIT: Not tested
-
I did not get to see your problem, but when you need some help and you can solve your problem, do not edit topic in the same way that you needed help someone else will need
-
Try this [server-side] local marker1 = createMarker(2219.662109375, -1155.7900390625, 1026.6960449219, "arrow", 2, 90,255,255,255) function teleport1(source) setElementInterior (source, 10, -978.90002441406,1053,1344.3000488281 ) setElementDimension (source, 40 ) end addEventHandler("onMarkerHit", marker1, teleport1) I did not test
-
Opa, fiz aqui pra você (: client-side: local screenW,screenH = guiGetScreenSize() local resW, resH = 1366,768 local x, y = (screenW/resW), (screenH/resH) serverName = "Nome do Servidor" addEventHandler("onClientRender", root, function() local time = getRealTime() local day = time.monthday local month = time.month local year = time.year + 1900 dxDrawText(serverName.."\1-\1FPS: "..getElementData(getLocalPlayer(), "fps").."\n"..day.."/"..month.."/"..year.."\1-\1"..getTimeS(), x*1190, y*723, x*1360, y*757, tocolor(255, 254, 254, 150), x*1.00, "clear", "right", "center", false, false, false, true, false) end ) function getTimeS() local time = getRealTime() local hours = time.hour local minutes = time.minute local seconds = time.second if (hours >= 0 and hours < 10) then hours = "0"..time.hour end if (minutes >= 0 and minutes < 10) then minutes = "0"..time.minute end if (seconds >= 0 and seconds < 10) then seconds = "0"..time.second end return hours..":"..minutes..":"..seconds end local fps = false function getCurrentFPS() -- Setup the useful function return fps end local function updateFPS(msSinceLastFrame) -- FPS are the frames per second, so count the frames rendered per milisecond using frame delta time and then convert that to frames per second. fps = (1 / msSinceLastFrame) * 1000 end addEventHandler("onClientPreRender", root, updateFPS) local function getAverageFPSOfFPSArray(table) -- Average FPS = (FPS1 + FPS2 + ... + FPSX) / X local totalFPS = 0 for _, fps in pairs(table) do totalFPS = totalFPS + fps end return totalFPS / #table end local currentSecondFPS = {} local lastSecondTicks = getTickCount() local lastFiveSecondsFPS = {} local function smoothFPS() -- Do we have a FPS rate already? if not getCurrentFPS() then return end -- Insert current FPS into a table for reference table.insert(currentSecondFPS, getCurrentFPS()) -- If a second passed, get the average FPS using the table -- (We always have at least one frame rendered, so dividing by 0 it's not a problem) if getTickCount() - lastSecondTicks >= 1000 then local averageFPSPerSecond = getAverageFPSOfFPSArray(currentSecondFPS) -- Reset variables currentSecondFPS = {} lastSecondTicks = getTickCount() -- Update the table containing last five seconds FPS -- Also update the FPS limit accordingly table.insert(lastFiveSecondsFPS, averageFPSPerSecond) -- Silently discard too old average FPS if #lastFiveSecondsFPS == 6 then table.remove(lastFiveSecondsFPS, 1) end -- Get the average FPS of the average FPS of each of the last five seconds, and use the result as the frame limit setElementData(localPlayer, "fps", (math.ceil(getAverageFPSOfFPSArray(lastFiveSecondsFPS)))); -- Sets elementData "fps" end end addEventHandler("onClientHUDRender", root, smoothFPS)
-
try this if isPlayerMapVisible () then return end not tested
-
Thank so much <3
-
local gPName = getPlayerName(getLocalPlayer()) dxDrawText(gPName.." text", screenW * 0.2291, screenH * 0.1966, screenW * 0.7716, screenH * 0.2552, tocolor(255, 255, 255, 255), 1.50, "bankgothic", "left", "top", false, false, false, true, false)
-
--SERVER-SIDE function getAccount() local acc = getAccountName(getPlayerAccount(source)) triggerClientEvent(source, "sendAcc", source, acc) end addEvent("getAcc", true) addEventHandler("getAcc", root, getAccount) ---------------------------------------------------------------------- --CLIENT-SIDE triggerServerEvent("getAcc", localPlayer) addEvent("sendAcc", true); addEventHandler("sendAcc", root, function(acc) account = acc or "N/A" end) EDIT: Not tested
-
function enterVehicle (player, seat, jacked) local accName = getAccountName (getPlayerAccount (player) if not isObjectInACLGroup("user."..accName, aclGetGroup ( "Admin" )) and getElementModel(source) == 411 then --Edit Acl and Vehicle ID cancelEvent() outputChatBox ( "*You are not allowed to drive this vehicle.", player) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), enterVehicle ) EDIT: Not tested
-
function getPlayerFromPartialName(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 blipPlayer(command, playerName) if playerName then if getPlayerFromPartialName(playerName) then local player = getPlayerFromPartialName(playerName) local blip = createBlipAttachedTo(player, 41) end end end addCommandHandler("find", blipPlayer) EDIT: Not tested
-
chat_range=50 addEventHandler("onPlayerJoin",getRootElement(), function () bindKey(source,"L","down","chatbox","L") end) addEventHandler("onResourceStart",getResourceRootElement(getThisResource()), function () for index, player in pairs(getElementsByType("player")) do bindKey(player,"L","down","chatbox","L") end end) function isPlayerInRangeOfPoint(player,x,y,z,range) local px,py,pz=getElementPosition(player) return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5<=range end function onChat(player,_,msg) local px,py,pz=getElementPosition(player) local nick=getPlayerName(player) for _,v in ipairs(getElementsByType("player")) do if isPlayerInRangeOfPoint(v,px,py,pz,chat_range) then outputChatBox(nick.." #ffffffShouts "..msg,v,30,30,200,true) end end end addCommandHandler("L",onChat) @Solidsnake14
-
Hi guys, how do I get 2 textures in 1 object? CSGO Example: Two skin on M4A4 (Assimov - Howl) One player has the skin Assimov and the other Howl The one with Howl sees Howl but also sees the other player's Assimov. [I do not know if you can understand, sorry for my English]
-
how can I do to verify that the password has changed on the site? or do I put it every time I log in he sets the password?
-
Does anyone know how to change the password of the account through the site and change it in internal.db? In the site I managed to do but only change in the site DB. Sorry for my english.
-
If the player clicks the ped with the id 1 it open the panel SERVER-SIDE: -- IDSkin, "id number", x, y, z, r peds = { {0, "1", 0, 0, 13, 0} } for i = 1, #peds do ped = createPed(peds[i][1], peds[i][3], peds[i][4], peds[i][5]) setElementRotation(ped, 0, 0, peds[i][6]) setElementData(ped, "id", peds[i][2], true) end CLIENT-SIDE function clickPed(button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement) if (clickedElement) and (getElementType(clickedElement) == "ped" ) then local x, y, z = getElementPosition(getLocalPlayer()) local wx, wy, wz = getElementPosition(clickedElement) local jij = getLocalPlayer() if (getDistanceBetweenPoints3D(x, y, z, wx, wy, wz)<=3) and (button == "left") and (state == "down" ) then local ped = getElementData(clickedElement, "id") if (ped == "1") then --FUNCTION PANEL end end else return end end addEventHandler("onClientClick", getRootElement(), clickPed, true)