Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Label = {} GUIEditor_Image = {} GUIEditor_Window[1] = guiCreateWindow(235,62,356,296,"sond by yaZan",false) GUIEditor_Button[1] = guiCreateButton(38,93,92,42,"B",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(232,95,92,42,"A",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(35,174,92,42,"D",false,GUIEditor_Window[1]) GUIEditor_Button[4] = guiCreateButton(236,180,92,42,"C",false,GUIEditor_Window[1]) GUIEditor_Button[5] = guiCreateButton(134,141,100,38,"PLAY\STOP",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(9,258,121,32,"by yaZan",false,GUIEditor_Window[1]) GUIEditor_Image[1] = guiCreateStaticImage(9,19,338,73,"yazan/jo.png",false,GUIEditor_Window[1]) bindKey("F5", "down", function() guiSetVisible(GUIEditor_Window[1], not guiGetVisible(GUIEditor_Window[1])) showCursor(guiGetVisible(GUIEditor_Window[1])) guiSetInputEnabled(guiGetVisible(GUIEditor_Window[1])) end) isOn = true -- ذا وش يبي؟ addEventHandler("onClientGUIClick", root, function () if (source == GUIEditor_Button[1]) then if isElement(sound) then destroyElement(sound) end sound = playSound("sounds/A.mp3") elseif (source == GUIEditor_Button[2]) then if isElement(sound) then destroyElement(sound) end sound = playSound("sounds/B.mp3") elseif (source == GUIEditor_Button[3]) then if isElement(sound) then destroyElement(sound) end sound = playSound("sounds/C.mp3") elseif (source == GUIEditor_Button[4]) then if isElement(sound) then destroyElement(sound) end sound = playSound("sounds/D.mp3") elseif (source == GUIEditor_Button[5]) then if isElement(sound) then if isSoundPaused(sound) then setSoundPaused(sound, false) else setSoundPaused(sound, true) end end end end)
  2. You're welcome.
  3. Try this: (Not Tested) addEventHandler("onClientPreRender", root, function() if getControlState("aim_weapon") and getPedWeapon(localPlayer) == 24 then local muzX, muzY, muzZ = getPedWeaponMuzzlePosition(localPlayer) if not isElement(weaponMarker) then weaponMarker = createMarker(muzX, muzY, muzZ, "corona", 0.5, 255, 0, 0, 170) end setElementPosition(weaponMarker, muzX, muzY, muzZ) else if isElement(weaponMarker) then destroyElement(weaponMarker) end end end) And, of course, you are the only who will see the marker when you aim (local player), other players won't see the marker.
  4. TAPL

    i need help

    If you haven't insert any data, you won't have any data to get it, And i don't see where you have insert the data.
  5. TAPL

    Mute problem

    You're welcome.
  6. TAPL

    Mute problem

    function muteplayer () setPlayerMuted ( source, true ) local name = getPlayerName ( source ) outputChatBox ( name.." is muted for 5 minutes.", getRootElement(), 250, 0, 0, true ) setTimer ( function(source) setPlayerMuted ( source, false ) outputChatBox ( "You are unmuted.", source, 250, 0, 0, true ) end, 5000, 1, source ) end addEvent ( "muteplayer", true ) addEventHandler ( "muteplayer", root, muteplayer )
  7. حط كودك
  8. onPlayerLogin setPlayerTeam
  9. https://forum.multitheftauto.com/viewtopic.php?f=148&t=38203
  10. setElementHealth "onClientPlayerDamage" cancelEvent
  11. حط الميتا
  12. Possible with setElementPosition + onClientPreRender.
  13. غير ذا addEventHandler("onClientPlayerJoin", root, function () guiSetVisible ( GUIEditor_Window[1] ,true) showCursor (true) end ) إلى addEventHandler("onClientResourceStart", resorceRoot, function () guiSetVisible ( GUIEditor_Window[1] ,true) showCursor (true) end )
  14. lol?
  15. setTimer math.random
  16. TAPL

    nevermind

    https://forum.multitheftauto.com/viewtopic.php?f=148&t=40809 https://wiki.multitheftauto.com
  17. تفضل + غير مجرب ------- client function ButtonCLick() if source == اسم الزرthen triggerServerEvent("spawn",getLocalPlayer()) end addEventHandler("onClientGUIClick",root,ButtonCLick,false) -------- server addEvent("spawn",true) addEventHandler("spawn",root, function() spawnPlayer(root,x+math.random(-1,1),y+math.random(-1,1),z) end) spawnPlayer(root,x+math.random(-1,1),y+math.random(-1,1),z) root? source غيرها إلى
  18. -- client side function checkTransfer() if isTransferBoxActive() == true then setTimer(checkTransfer, 2000, 1) else setElementData(localPlayer, "iLoveMyMother", true) end end addEventHandler("onClientResourceStart", resourceRoot, checkTransfer) -- server side local vehicle = {} local marker = createMarker(-3561.5, -3002.5, 45, "cylinder", 2, 0, 0, 255, 255) function spawnVeh(player) if getElementType(player) == "player" and not isPedInVehicle(player) then if not getElementData(player, "iLoveMyMother") then if isElement(vehicle[player]) then destroyElement(vehicle[player]) end local x, y, z = getElementPosition(player) vehicle[player] = createVehicle(429, x + 1, y, z) warpPedIntoVehicle(player, vehicle[player]) end end end addEventHandler("onMarkerHit", marker, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end)
  19. team = createTeam("Console",255,0,0) function Chack() for i,player in ipairs(getPlayersInTeam(team)) do local acc = getPlayerAccount(player) local playerTeam = getPlayerTeam(player) if not isGuestAccount(acc) then if isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) then if playerTeam ~= team then setPlayerTeam(player, team) end else if playerTeam == team then setPlayerTeam(player, nil) end end end end end setTimer(Chack,5000,0)
  20. setCameraTarget
  21. TAPL

    Question

    ~_~ How does the garage saved for the person?
  22. TAPL

    Moving the text

    Change this "left" to "right".
  23. oh i didn't know that a vehicle or object or even an marker can type the command if ( getElementType(thePlayer) == "player" ) then
  24. I didn't understand what you trying to do, can you explain somehow better? local teamEnd = getAccountData(account, "player-team", team) setPlayerTeam(player, getTeamFromName( teamEnd ) ) I am guess that you meant to use setAccountData not getAccountData or you forgot and put 3 arguments in getAccountData but it required 2 arguments only. but still if you was meant setAccountData, teamEnd will be a bool and you can't get team from bool, team name must be string lol.
×
×
  • Create New...