Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. Maybe? ctrlNames = { "forwards","backwards","left","right","jump","sprint","walk","crouch","enter_exit" } local function followHim(player) for _, ctrl in ipairs(ctrlNames) do setControlState(player,(ctrl),true) end end addEventHandler("onPlayerDamage", root, function( attacker, attackerweapon, bodypart, loss ) for _,player in ipairs(getElementsByType("player")) do local policeTeam = getPlayerTeam( attacker ) if ( policeTeam == Police ) and ( attacker == Police ) then if ( wantedLevel > 0 ) then -- wantedLevel is predefined .. if ( attackerweapon == 3 ) and ( loss > 2 ) then setTimer(followHim, 10*500/100*10*5-2450, 0, player) -- the result : 50 showCursor( true ) end end end end end)
  2. gate = createObject(980,2482.7,-1687.8,15.3) function opendoor() if i then moveObject (gate, 1500, 2482.7, -1687.8, 15.3) else moveObject (gate, 1500, 2482.7,-1687.8, 17.3) end i = not i end bindKey("tab", "down", opendoor)
  3. يعني تبينا نجرب عنك مثلاً؟
  4. https://community.multitheftauto.com/index.php?p=resources&s=details&id=5617 original https://community.multitheftauto.com/index.php?p=resources&s=details&id=1152 DONE
  5. TAPL

    مشكلة

    addEventHandler ( 'onResourceStart', resourceRoot, function () call(getResourceFromName('scoreboard'), 'addScoreboardColumn', 'Counter') for k,v in ipairs(getElementsByType('player')) do if ( v ) then setElementData ( v, 'Counter', 0 ) end end end ) addEventHandler ( 'onPlayerJoin', getRootElement(), function () setElementData ( source, 'Counter', (getElementData ( source, 'Counter' ) or 0) + 1 ) end )
  6. تصك اللعبه؟
  7. غير هذا addCommandHandler ( "invisible", invisible) إلى addEvent("invisible",true) addEventHandler("invisible", root, invisible) source إلى Player وغير الي بأول سطر Player و أحذف
  8. original https://community.multitheftauto.com/index.php?p= ... mp;id=2604 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5595 original https://community.multitheftauto.com/index.php?p=resources&s=details&id=2604 DONE
  9. TAPL

    Forgot how :(

  10. playerFraktion and spawnTeam and Zivilisten and Cops and Triaden and Reporter and Army and FBI and ADAC and Aztecas and Terror and Mafia and Angels and Hitman and Sanitaeter and Undercover is not defined anywhere in your code.
  11. TAPL

    ^^ Hey.

    bindKey("F1", "down", "shader")
  12. function save() local vehicle = getPedOccupiedVehicle(source) if vehicle then local adam = getPlayerAccount(source) local upgrade = getVehicleUpgradeOnSlot(vehicle, 12) setAccountData(adam, "teker", upgrade) outputChatBox(upgrade) end end addEvent("save", true) addEventHandler("save", root, save)
  13. TAPL

    Forgot how :(

    Maybe? function open() if (source == start_button) then if not test then test = guiCreateStaticImage(0, 0.41, 0.3, 0.55, "pictures/8.png", true, gui) else guiSetVisible(test, not guiGetVisible(test)) end end end addEventHandler("onClientGUIClick", start_button, open, false)
  14. Already available at useful functions. https://wiki.multitheftauto.com/wiki/GetPlayerFromNamePart
  15. https://community.multitheftauto.com/index.php?p=resources&s=details&id=4199
  16. This FastFire will blocking you from shooting fast, you may want use my resource. https://community.multitheftauto.com/index.php?p=resources&s=details&id=5317
  17. Nope it's correct.
  18. -- Client Side -- vehicles = { {"BMX", 481}, {"Bike", 509}, {"Mountain Bike", 510}, {":O", 462}, } grid = guiCreateGridList(0.01, 0.2, 0.99, 0.5, true, Wnd) guiGridListAddColumn(grid, "Vehicles", 0.85) for i,veh in ipairs(vehicles) do row = guiGridListAddRow(grid) -- guiGridListSetItemText(grid, row, 1, tostring(veh[1]), false, false) guiGridListSetItemData(grid, row, 1, tostring(veh[2])) end function use() local row, col = guiGridListGetSelectedItem(grid) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(grid, row, 1)) if model ~= "" then triggerServerEvent("CreVehice", localPlayer, model) end end end addEventHandler("onClientDoubleClick", grid, use, false) -- Server Side -- local vehicles = {} function spawnVeh(id) local x, y, z = getElementPosition(source) if isElement(vehicles[source]) then destroyElement(vehicles[source]) end vehicles[source] = createVehicle(id, x + 1, y, z) end addEvent("CreVehice",true) addEventHandler("CreVehice", root, spawnVeh) addEventHandler("onPlayerQuit", root, function() if isElement(vehicles[source]) then destroyElement(vehicles[source]) vehicles[source] = nil end end)
  19. i don't know if this is what cause the problem or not, just try. setAccountData (account, "funmodev2-money", tostring (getPlayerMoney (source))) to setAccountData(account, "funmodev2-money", getPlayerMoney(source))
  20. Try with tonumber setPlayerMoney (source, tonumber(playerMoney))
  21. Awesome! I hope friendly fire burning issue will be fixed in 1.3.2 Good job.
  22. You're welcome
  23. You're welcome.
  24. Simply, save the current skin as elementData WHEN you open the skin selector window, and get it whenever you need.
×
×
  • Create New...