Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    Question

    You need to get the account first then get the account data, if he has the data then open the gate for him? getPlayerAccount isGuestAccount -- You might need this. getAccountData
  2. ? ما أشوف أي كود بالموضوع كيف نساعدك؟ نقرأ الي بمخك مثلاً؟ !وش القيم مود اصلاً *ينقل إلى قسم البرمجة
  3. function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end local xa, ya, za = getElementPosition(marker1) local xb, yb, zb = getElementPosition(marker2) function walking(walking) setElementRotation(johnny, findRotation(xa, ya, xb, ya)) setPedAnimation( johnny, "ped", "WOMAN_walknorm") end How difficult it is to understand this? Edit: Also setElementRotation required 3 arguments, while findRotation return one argument only.
  4. https://wiki.multitheftauto.com/wiki/FindRotation findRotation (Function source) must be inside your script.
  5. kickPlayer giveWeapon createVehicle warpPedIntoVehicle getElementHealth setElementHealth givePlayerMoney *ينقل لقسم البرمجة
  6. Do you know that addCommandHandler client side does not have player parameter? Does your function isPlayerVIP available client side?
  7. onClientPlayerWasted = عندما يموت لاعب https://wiki.multitheftauto.com/wiki/OnC ... ayerWasted
  8. isTransferBoxActive
  9. هههههههههههه تستهبل على مخي انت؟ تحط فيه أند و تقول خربان شوف سطر7
  10. You're welcome.
  11. *ينقل لقسم البرمجة
  12. -- Server Side -- iLoveMyMother = true function MoveDoor() if iLoveMyMother then moveObject(door, 5000,-2596.6999511719, 1354.5999755859, 13.39999961853) else moveObject(door, 5000, -2596.5, 1354.6999511719, 7.5999999046326) end iLoveMyMother = not iLoveMyMother end addEventHandler("onResourceStart", resourceRoot, function() door = createObject(3084, -2596.5, 1354.6999511719, 7.5999999046326,0,0,82) for i, player in ipairs (getElementsByType("player")) do bindTheKeys(player) end end) addEventHandler("onPlayerJoin", root, function() bindTheKeys(source) end) function bindTheKeys(player) bindKey(player, "Tab", "down", MoveDoor) end
  13. function gui(player) if vipGUI and exports.SCGvip:isPlayerVIP(player) then triggerClientEvent(player, "GUIsee", player) end end addCommandHandler("viphats", gui) function giveVIPJetpack(thePlayer) if giveVIPJetpack and exports.SCGvip:isPlayerVIP(thePlayer) then if not doesPedHaveJetPack(thePlayer) then givePedJetPack(thePlayer) outputChatBox("VIP: Jetpack enabled", thePlayer, 0, 250, 0) else removePedJetPack(thePlayer) outputChatBox("VIP: Jetpack removed", thePlayer, 250, 0, 0) end end end addCommandHandler("vipjetpack", giveVIPJetpack)
  14. isElementWithinMarker cancelEvent Event: "onClientPlayerDamage"
  15. TAPL

    Tables

    Not tested, and not sure if it will work or not. function getPlayersCountInMarker(marker) if isElement(marker) and getElementType(marker) == "marker" then local col = getElementColShape(marker) if col then local count = getElementsWithinColShape(col, "player") if count and type(count) == "table" then return #count end end end end
  16. TAPL

    Bankrob-system

    givePlayerMoney client side doesn't require player element. outputChatBox client side doesn't require player element.
  17. TAPL

    ped

    -- client side local ped = createPed(id, x, y, z) addEventHandler("onClientPedDamage", ped, function() cancelEvent() end)
  18. TAPL

    Tables

    outputChatBox(#robbing)
  19. https://forum.multitheftauto.com/viewtopic.php?f=119&t=49609
  20. يب
  21. -- Server Side (not tested) addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if account and not isGuestAccount(account) then local team = getPlayerTeam(source) if team then setAccountData(account, "Team", getTeamName(team)) end end end) addEventHandler("onPlayerLogin", root, function(_, account) local team = getAccountData(account, "Team") if team then local team = getTeamFromName(team) if not team then local team = createTeam(getAccountData(account, "Team"), 0, 0, 255) end setPlayerTeam(source, team) end end)
  22. سطر رقم 2 ذا سيرفر و باقي الكود كلينت
  23. بما ان لا يوجد أفنت لما التيم يتغير في ذي الحاله بتحتاج إلى تايمر لا نهائي setTimer getElementsByType -- for loop all players getPlayerTeam getTeamFromName setElementModel
  24. -- server side createTeam("Police", 0, 0, 255) بما انك تحط اللاعب في التيم عن طريق الأدمنية ليه ما تكمل الجميل و تحط له الشخصية من الأدمنية كمان
  25. قصدك أن أنت تحط اللاعب في التيم عن طريق الأدمنية؟
×
×
  • Create New...