Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. function win(ammo, killer, weapon, bodypart) if (killer and getElementType(killer) == "player" and killer ~= source) then local H = getElementData(killer, "XP") or 0 local S = getElementData(killer, "Level") local killer1 = getPlayerName(killer) local noob = getPlayerName(source) local X = math.random(5, 70) setElementData(killer, "XP", tonumber(H)+X) local H = tonumber(H) + X if tonumber(H) == 100 then setElementData(killer, "Level", "Lvl 1") elseif tonumber(H) == 400 then setElementData(killer, "Level", "Lvl 2") elseif tonumber(H) == 600 then setElementData(killer, "Level", "Lvl 3") elseif tonumber(H) == 800 then setElementData(killer, "Level", "Lvl 4") elseif tonumber(H) == 1000 then setElementData(killer, "Level", "Lvl 5") elseif tonumber(H) == 1200 then setElementData(killer, "Level", "Lvl 6") elseif tonumber(H) == 1400 then setElementData(killer, "Level", "Lvl 7") elseif tonumber(H) == 1600 then setElementData(killer, "Level", "Lvl 8") elseif tonumber(H) == 1800 then setElementData(killer, "Level", "Lvl 9") elseif tonumber(H) == 2000 then setElementData(killer, "Level", "Lvl 10") elseif tonumber(H) == 2200 then setElementData(killer, "Level", "Lvl 11") elseif tonumber(H) == 2400 then setElementData(killer, "Level", "Lvl 12") elseif tonumber(H) == 2600 then setElementData(killer, "Level", "Lvl 13") elseif tonumber(H) == 2800 then setElementData(killer, "Level", "Lvl 14") elseif tonumber(H) == 4000 then setElementData(killer, "Level", "Lvl 15") elseif tonumber(H) == 4200 then setElementData(killer, "Level", "Lvl 16") elseif tonumber(H) == 4400 then setElementData(killer, "Level", "Lvl 17") elseif tonumber(H) == 4600 then setElementData(killer, "Level", "Lvl 18") elseif tonumber(H) == 4800 then setElementData(killer, "Level", "Lvl 19") elseif tonumber(H) == 4900 then setElementData(killer, "Level", "Lvl 20") elseif tonumber(H) == 7000 then setElementData(killer, "Level", "Lvl 21") elseif tonumber(H) == 9000 then setElementData(killer, "Level", "Lvl 22") elseif tonumber(H) == 15999 then setElementData(killer, "Level", "Lvl 23") end end end addEventHandler( "onPlayerWasted", getRootElement(), win) function onLogin (_,account) setElementData(source, "Level", getAccountData(account, "LV") or "0") setElementData(source, "XP", getAccountData(account, "EXP") or "0") end addEventHandler ("onPlayerLogin", root, onLogin) function saveData(thePlayer, theAccount) local theAccount = getPlayerAccount(source) if (theAccount and not isGuestAccount(theAccount)) then setAccountData (theAccount, "LV", getElementData(thePlayer, "Level")) setAccountData (theAccount, "EXP", getElementData(thePlayer, "XP")) end end addEventHandler ("onPlayerQuit", root, function () saveData(source, getPlayerAccount(source)) end) addEventHandler ("onPlayerLogout", root, function (prev) saveData(source, prev) end)
  2. --Client --onClientGUIClick link = guiGetText (the edit box) triggerServerEvent("downloadFile", getLocalPlayer(), link) -- Server addEvent("downloadFile", true ) function fileDownload(link) fetchRemote(link ,myCallback, "", false, source) end addEventHandler("downloadFile", root, fileDownload) function myCallback(responseData, errno, playerToReceive) if errno == 0 then triggerClientEvent(root, "onClientGotImage", playerToReceive, responseData) end end -- client addEvent("onClientGotImage", true) addEventHandler( "onClientGotImage", root, function(pixels) theShader = dxCreateShader("material/effect.fx", 0, 0, true, "ped") myTexture = dxCreateTexture(pixels) if theShader and myTexture then dxSetShaderValue(theShader, "gTexture", myTexture) engineApplyShaderToWorldTexture(theShader, "army", source) end end)
  3. غير الأفنت و استخدم هذا افضل https://wiki.multitheftauto.com/wiki/OnClientMarkerLeave
  4. -- Client Side addEventHandler("onClientPlayerWasted", localPlayer, function() if guiGetVisible(wndNameHere) then guiSetVisible(wndNameHere, false) showCursor(false) end end)
  5. TAPL

    Please help

    Since you write in English (Google translator?), why you post it in "Algerian & Tunisian" section? You from Saudi Arabia so you should speak Arabic, where you can find Arabic section here: https://forum.multitheftauto.com/viewforum.php?f=119 There no "Algerian & Tunisian" Moderator so i'll have to deal with it. Moved to Scripting.
  6. قسم اعلانات دعم فني؟ ليه كل ما صار شي فتحتو موضوع خادم احمر تهكر خادم ازرق تهكر خادم اخضر تهكر ارجاع الأستضافة سيرفرات مجانية الخادم طفى الخادم ينتقل لخادم الخادم انتحر الخادم مات الخادم فطس الخادم طلع الفضاء الخادم وصل القمر الخادم طلع له جناح الخادم يطير الخادم طلع له رجل طيب خلاص عرفنا انكم استضافة موضوع واحد يكفي تحطو فيه كل الأحداث و التحديثات الي تصير بالأستضافة و خوادمها و كل توابعها
  7. TAPL

    get random car

    fixVehicle client side won't affect server side vehicle, if i'm not wrong.
  8. TAPL

    get random car

    DDseventhMarker = createMarker(-1410, 998, 1025, "corona", 2, 250, 0, 250, 255) setElementInterior(DDseventhMarker, 15) hitTimer = {} function DDrepair(markerHit) if (markerHit == DDseventhMarker) then local vehicle = getPedOccupiedVehicle(source) if vehicle and not isTimer(hitTimer[source]) then hitTimer[source] = setTimer(function() end, 30000, 1) setMarkerColor(DDseventhMarker, 250, 0, 250, 0) fixVehicle(vehicle) end end end addEventHandler("onPlayerMarkerHit", root, DDrepair)
  9. https://forum.multitheftauto.com/viewtopic.php?f=91&t=45189
  10. TAPL

    get random car

    # is used to get the length of the table. math.random will give you a number between 1 and the length of the table or the number you specify. Also math.random can be used in three ways. You can find more info about it here: http://lua-users.org/wiki/MathLibraryTutorial
  11. txd only. engineApplyShaderToWorldTexture
  12. https://forum.multitheftauto.com/viewtopic.php?f=119&t=63163
  13. I think he wants to get players count and the status (Online/Offline) for other servers from its IP.
  14. -- Server Side addEventHandler("onPlayerDamage", root, function(attacker, weapon) if attacker and getElementType(attacker) == "player" and weapon == 2 then outputChatBox(getPlayerName(source).." was hit with a goldclub. LOOL", root, 255, 255, 255) end end)
  15. -- Server Side addCommandHandler("nrjkwndkjasnjfandkfjasnda", function(player) if not hasObjectPermissionTo(player, "general.adminpanel", false) then triggerClientEvent(player, "OpenNoneAdminPanel", player) end end) -- Client Side addEvent("OpenNoneAdminPanel", true) addEventHandler("OpenNoneAdminPanel", root, function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) end) bindKey("p", "down", "nrjkwndkjasnjfandkfjasnda")
  16. https://wiki.multitheftauto.com/wiki/Shader_examples
  17. https://wiki.multitheftauto.com/wiki/FindRotation https://wiki.multitheftauto.com/wiki/OnPlayerDamage getPlayerSerial setTimer getElementPosition getDistanceBetweenPoints2D setElementPosition setControlState setPedRotation
  18. TAPL

    login log

    onPlayerLogin getRealTime setAccountData getAccountData getAccount getAccounts
  19. dxCreateFont
  20. You mean this script: https://community.multitheftauto.com/index.php?p=resources&s=details&id=5844 The file S_KDR is compiled so that we can't help you with it, contact the author. https://forum.multitheftauto.com/memberlist.php?mode=viewprofile&u=58638
  21. Your script is work, MAKE SURE IT SERVER SIDE NOT CLIENT SIDE.
  22. He don't want to close the gate by command, he wants to close by timer Try this function createTheGate () myGate = createObject ( 971 ,-3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ) end addEventHandler ( "onResourceStart", getResourceRootElement ( getThisResource () ), createTheGate ) function openMyGate ( ) moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 90.78617095947, 0, 0, 90 ) setTimer ( moveObject ( myGate, 3000, -3258.5517578125, 751.85546875, 116.78617095947, 0, 0, 90 ), 5000, 1 ) end addCommandHandler("swat",openMyGate) Wrong timer. @Just make sure you have it server side.
  23. اما تعال بيجي الكلام في الشات؟ return k لايكون تحسب لما تسوي لا خلاص انت 10 نجوم
  24. ما شاء الله عليك ذكي لازم خمس نجوم حبيبي الكود هذا يستخدم للرد في حاله انك مستخدم الفنكشن في فنكشكن و كان العنصر المطلوب فنكشن اما في الكود الي طرحته سابقاً return ياليت توضح لنا الفائده من k = outputChatBox('Hello World !') addCommandHandler('Chat', function(player) if not isPlayerInWater(player) then return k end end )
×
×
  • Create New...