-
Posts
395 -
Joined
-
Last visited
Everything posted by HUNGRY:3
-
Which dimension is the race players? If u know it Then.. go to your race map file , enter meta.xml and change the dimension
-
Client addEvent("getClientServerName",true) function mhm(serverName) Lab = guiCreateLabel(13, 2, 521, 15, serverName, false) end addEventHandler("getClientServerName",root,mhm) server function getServerInfo() local serverName = getServerName() triggerClientEvent("getClientServerName",root,serverName) end addEventHandler( "onResourceStart", resourceRoot, getServerInfo ) not tested but should work
-
local screenW, screenH = guiGetScreenSize() function Test(kazanma) local Nick = "PlayerNick:"..getPlayerName(localPlayer) dxDrawRectangle(screenW * 0.2709, screenH * 0.1966, screenW * 0.4458, screenH * 0.5247, tocolor(0, 0, 0, 179), false) dxDrawText("PLAYER STATS SYSTEM BY PYTHON", screenW * 0.2826, screenH * 0.1966, screenW * 0.6918, screenH * 0.2357, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText("Maps Win:"..getElementData(getLocalPlayer(),"wins"), screenW * 0.2753, screenH * 0.3164, screenW * 0.5322, screenH * 0.3529, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) dxDrawText(Nick, screenW * 0.2753, screenH * 0.2799, screenW * 0.5322, screenH * 0.3164, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "left", "top", false, false, false, false, false) end addEventHandler("onClientRender", root, Test) addEvent("onClientPythonStats", true ) addEventHandler("onClientPythonStats", root, Test) Why u use setElementData in server side while you can use it in client side? It's shared function Also here is test code for map wins client side function hello() setElementData(getLocalPlayer(),"wins", getElementData(getLocalPlayer(),"wins") + 1) end addCommandHandler("givewins",hello)
-
no guys he meant when he opens the Dx it can move and do some cool things try learning from this @artenos https://wiki.multitheftauto.com/wiki/DxDrawAnimWindow
-
Lol thank you , but about the forum doesn't like my language it should be "cursors hit" but I did "cursors(no space)hit"
-
No no I mean when cursor is showing and player click on an element the window should appear near the cursor Yeah I know it but I have no idea look.. Like this? function cursorshit() local showing = isCursorShowing () if showing then local screenx, screeny = getCursorPosition() local myWindow = guiCreateWindow ( screenx,screeny, 0.5, 0.4, "test", true ) end addCommandHandler("okay",cursorshit)
-
Hello I want to open a window near cursor how to do that?
-
NO PROBLEM !
-
LOL! just type inside it This: please copy and paste this sentence.
-
You understood me by wrong, i said he can't edit / change Players account names https://wiki.multitheftauto.com/wiki/SetAccountName
-
Try this addEventHandler("onPlayerJoin",root, function() setPedStat ( source, 70, 999 ) setPedStat ( source, 71, 999 ) setPedStat ( source, 72, 999 ) setPedStat ( source, 74, 999 ) setPedStat ( source, 76, 999 ) setPedStat ( source, 77, 999 ) setPedStat ( source, 78, 999 ) setPedStat ( source, 79, 999 ) end )
-
There is an easier way! function test ( source,killer ) local level = getPlayerWantedLevel ( killer ) if getTeamName(getPlayerTeam(killer)) == "Criminal" then if getTeamName(getPlayerTeam(source)) == "Criminal" then setPlayerWantedLevel ( killer, level - 1) end end end addEventHandler ( "onPlayerWasted", getRootElement (), test )
-
Nothing you didn't defined screenH and screenW lol local screenH,screenW = guiGetScreenSize() function RadioPlayerImage() dxDrawImage(screenW * 0.3000, screenH * 0.1533, screenW * 0.1163, screenH * 0.0467, "off.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end function RadioPlayerImage2() dxDrawImage(screenW * 0.3000, screenH * 0.1533, screenW * 0.1163, screenH * 0.0467, "images/on.png", 0, 0, 0, tocolor(255, 255, 255, 255), false) end addEventHandler("onClientClick", root, function(Button2, state, x2, y2) if Button2 == "left" and state == "down" then if x2 >= screenW * 0.3000 and y2 >= screenH * 0.1533 and x2 <= screenW * 0.3000+screenW * 0.1163 and y2 <= screenH * 0.1533+screenH * 0.0467 then removeEventHandler("onClientRender", root, RadioPlayerImage) addEventHandler("onClientRender", root, RadioPlayerImage2) sound = playSound("http://sh.mncdn.com:8092/listen.pls") end else if x2 >= screenW * 0.3000 and y2 >= screenH * 0.1533 and x2 <= screenW * 0.3000+screenW * 0.1163 and y2 <= screenH * 0.1533+screenH * 0.0467 then stopSound( sound ) addEventHandler("onClientRender", root, RadioPlayerImage) removeEventHandler("onClientRender", root, RadioPlayerImage2) end end end )
-
Hmmm what's the problem and what does debug say?
-
Nope it's an open source look viewtopic.php?f=108&t=82870 #REKT
-
addEventHandler("onClientRender",resourceRoot, function() --Dx shit
-
function Lol(thePlayer) local localPlayerName = getPlayerName(thePlayer) outputChatBox ( "#164F8C[TEXT]"..localPlayerName.."#FFFFFFis Laughing out loud!", getRootElement(), 255, 255, 255 ) end addCommandHandler("lol", Lol)
-
setElementAlpha -- invisible cancelEvent() "onClientPlayerDamage"
-
holy shit man..... there's an easy way lol.. function onPlayerQuit () local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then for slot = 1, 12 do setAccountData ( account, "save-wep".. slot, getPedWeapon ( source, slot ) ) setAccountData ( account, "save-ammo".. slot, getPedTotalAmmo ( source, slot ) ) end end end addEventHandler ( "onPlayerQuit", getRootElement ( ), onPlayerQuit ) function saveWep() local playeraccount = getPlayerAccount ( source ) if ( playeraccount ) then for slot = 1, 12 do local wep = getAccountData ( account, "save-wep".. slot ) local ammo = getAccountData ( account, "save-ammo".. slot ) giveWeapon ( source, wep, ammo ) end end end addEventHandler("onPlayerLogin", root,saveWep)
-
local mysql = exports.cG_MySQL function logThePlayer(thePlayer, username, password) if thePlayer and username and password then if getElementType(thePlayer) == "player" then local account = mysql:dbQuery("SELECT * FROM accounts WHERE username='" .. username .. "'") for i, sor in ipairs(account) do if sor["password"] == password then local lastLogin = getRealTime() if tostring(lastLogin.month+1):len() < 2 then lastLogin.month = "0" ..tostring(lastLogin.month)+1 end if tostring(lastLogin.monthday):len() < 2 then lastLogin.monthday = "0" ..tostring(lastLogin.monthday) end local lastLoginText = tostring(lastLogin.year+1900 .. "-" .. lastLogin.month .. "-" .. lastLogin.monthday) mysql:dbQuery("UPDATE accounts SET LastLogin='" .. lastLoginText .. "' WHERE username='" .. username .. "'" ) --egyenlore csak a utolso belepest elenorzi local character = mysql:dbQuery("SELECT * FROM characters WHERE accountname='" .. username .. "'") if character then outputChatBox("van karaktered") else outputChatBox("meg nincs karaktered") end else triggerClientEvent(thePlayer, "hideLGP", getRootElement()) end end end end end addEvent("logIn", true) addEventHandler("logIn", getRootElement(), logThePlayer) lol
-
Server function vipReplaceModele (thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "VIP" ) ) then end end addEvent( "onReplace", true ) addEventHandler( "onReplace", root, vipReplaceModele ) client function replaceModele () triggerServerEvent("onReplace",localPlayer) txd = engineLoadTXD("hydra.txd") engineImportTXD(txd, 520) dff = engineLoadDFF("hydra.dff", 520) engineReplaceModel(dff, 520) end addEventHandler("onPlayerLogin",root,replaceModele)