-
Posts
7,337 -
Joined
-
Days Won
11
Everything posted by TAPL
-
https://wiki.multitheftauto.com/wiki/GuiCreateEdit
-
addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if source == block then blockedWeapon = guiGetText(idbl) end end) function weaponSwitch(previousWeaponID, currentWeaponID) local WeaponID = getPedWeapon(localPlayer) if WeaponID == tonumber(blockedWeapon) then toggleControl("fire",false) else toggleControl("fire",true) end end addEventHandler("onClientPlayerWeaponSwitch", getRootElement(), weaponSwitch)
-
try this (client) addEventHandler ("onClientGUIClick", getRootElement(), function(button, state, absoluteX, absoluteY) if source == block then blockedWeapon = guiGetText(idbl) end end) function weaponSwitch(previousWeaponID, currentWeaponID) if currentWeaponID == blockedWeapon then toggleControl("fire",false) else toggleControl("fire",true) end end addEventHandler("onClientPlayerWeaponSwitch", getRootElement(), weaponSwitch)
-
function bastardWasted() addEventHandler("onClientRender",root,drawImage) setTimer(function() removeEventHandler("onClientRender",root,drawImage) end,1000,1) end addEventHandler("onClientPlayerWasted",localPlayer,bastardWasted) function drawImage() dxDrawImage(Arguments here) end
-
If the web server is on the same machine, you can simply link the appropriate web server directory to http-client-files. If the web server is on a separate machine, ensure it has access to http-client-files via a network path, or maintain a remote copy using synchronization software. or you have to copy it every time you add a new resource
-
you shouldn't delete resources folder just copy http-client-files folder
-
i think this what you want function refresh () setTimer(destroyElement, 5000, 1,source) end addEventHandler("onVehicleExplode", root, refresh)
-
function refresh () destroyElement(source) end addEventHandler("onVehicleExplode", root, refresh)
-
This function removes a command handler, that is one that has been added using addCommandHandler. This function can only remove command handlers that were added by the resource that it is called in. so if wiki is not wrong then this way won't work this one will work addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "kill" then cancelEvent() end end)
-
Dbug are you using MTA debug system or a program? it's shouldn't show this error the script must work 100% or maybe you did something wrong in meta (show your meta).
-
you can check if the player is admin by this way function justTest(thePlayer) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Admin")) then outputChatBox("TRUE", thePlayer, 0, 255, 0) else outputChatBox("FALSE", thePlayer, 255, 0, 0) end end addCommandHandler("amiadmin", justTest) also this work too function isPlayerAdmin(thePlayer) local accName=getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." ..accName, aclGetGroup("Admin")) then return true end end function justTest(thePlayer) if isPlayerAdmin(thePlayer) then outputChatBox("TRUE", thePlayer, 0, 255, 0) else outputChatBox("FALSE", thePlayer, 255, 0, 0) end end addCommandHandler("amiadmin", justTest)
-
function showClientImage() JoinImg = guiCreateStaticImage( 0.0, 0.0, 1279.0, 770, "image.png", false ) setTimer(function() guiSetAlpha(JoinImg, guiGetAlpha(JoinImg) - 0.1) end, 500, 6) end addEventHandler("onClientResourceStart", resourceRoot, showClientImage)
-
function waterCheck() for i, player in ipairs(getElementsByType("player")) do if isElementInWater(player) then killPed(player) end end end setTimer(waterCheck,1000,0)
-
Not needed, he are using BaseMode while ID system are already exist in BaseMode.
-
function ShowID(player) outputChatBox("Your ID is: "..getElementData(player,"ID")),player,255,255,0) end addCommandHandler("id",ShowID)
-
غير ممكن عمل سيرفر بـ أستضافة مواقع Dedicated Server أو VPS لازم يكون عندك خادم من نوع
-
spawnPlayer ( source, 252, 1861, 9, 1, 0, 0, t) t is not defined.
-
Yeah, if you leave the server and another player joins, when you join again your ID will change. not this what i mean i mean if other player quit and another player join your ID will change example: player A join the server first he will have ID 1 player B join the server after A join he will have ID 2 player C join the server after B join he will have ID 3 player D join the server after C join he will have ID 4 player F join the server after D join he will have ID 5 now if player A quit from the server and then player J join the server, player B and player C and player D and player F will have new ID (his ID will changed).
-
addEventHandler ( 'onPlayerJoin', root, function ( ) for i, v in ipairs ( getElementsByType ( 'player' ) ) do -- For-loop again to get all elements setElementData ( v, 'ID List', tostring(i) ) -- set all id's again end -- end the for-loop end -- close the function ) doesn't this means that almost every time an player quit and another player join will make your id changing? lol
-
make sure you have the last scoreboard from http://mtasa-resources.googlecode.com/f ... s-r841.zip and then add this in line 704 elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) else if still not working then show your full code.
-
you must edit Scoreboard to make the image showing put this in file "dxscoreboard_client.lua" line 704 elseif column.name == "Home" then dxDrawImage( topX+theX, y+s(1), 16, 11, content, 0, 0, 0, cWhite, drawOverGUI ) else
-
بالنسبة للسكربت الي أنت حاطه ماله دخل بالي تبيه نهائياًَ بالنسبة لمنع حرف ف أنت تبي تمنع الكتابة في الشات عام في ثلاث طرق: الأولى: حذف أختصار حرف ف ( طبعاً حتى لو حذفت حرف ف يمكن الكتابة في الشات عن طريق أف8 لذالك يجب أستخدام الطريقة الأولى مع الثانية أو الثالثة) ز unbindKey(player,"t") onPlayerCommand عن طريق كنسل إيفينت للحدث say الثانية: منع أمر addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "say" then cancelEvent() end end) onPlayerChat الثالثة: تسوي كنسل إيفينت لـ الحدث addEventHandler("onPlayerChat", root, function (meg, ChatType) if ChatType == 0 then cancelEvent() end end)
-
why don't add an rules when some one upload a new resource he can see it rules: don't upload skins mode.. cars mode.. etc...
-
you forgot a thing you hide the gui on click (no) but you didn't hide the cursor addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Image[2] then if spam then outputChatBox("You have to wait 30 sec.. ",255,0,0) return end local sound = playSound("sounds/cash.mp3") setSoundVolume(sound, 1.5) triggerServerEvent ("showMoney", localPlayer) spam = true setTimer(function() spam = false end,30000,1) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) end end) Correct addEventHandler('onClientGUIClick',root, function() if source == GUIEditor_Image[2] then if spam then outputChatBox("You have to wait 30 sec.. ",255,0,0) return end local sound = playSound("sounds/cash.mp3") setSoundVolume(sound, 1.5) triggerServerEvent ("showMoney", localPlayer) spam = true setTimer(function() spam = false end,30000,1) elseif source == GUIEditor_Image[3] then guiSetVisible(GUIEditor_Window[1],false) showCursor(false) end end)