Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. Pickup = { {159.5712890625,-169.95487976074,1.578125}, {-2367.3803710938,-1654.8669433594,486.3369140625}, {-2079.6606445313,1432.4488525391,7.1015625} } function createRandomPickUp() random = Pickup[math.random(#Pickup)] pick = createPickup(random[1], random[2], random[3], 3, 1550) blip = createBlipAttachedTo(pick, 37) end addEventHandler("onResourceStart", resourceRoot, createRandomPickUp) addEventHandler("onPickupHit", root, function(hitPlayer) if source == pick then if (getTeamName(getPlayerTeam(hitPlayer)) == "Criminal") then destroyElement(pick) destroyElement(blip) givePlayerMoney(hitPlayer, math.random(4000, 6000)) createRandomPickUp() else cancelEvent() end end end)
  2. Thank you very much.
  3. addEventHandler("onClientGUIClick", root, function() if source == اسم الزر then setPedAnimation(localPlayer, "ped", "WOMAN_walknorm", 5000) end end)
  4. addEventHandler("onClientGUIClick", root, function() if source == اسم الزر then setPedAnimation(localPlayer, "ped", "WOMAN_walknorm") end end)
  5. (حط كودك كامل (كلينت + سيرفر
  6. https://wiki.multitheftauto.com/wiki/Slothman/Zombies لـ رقم 0 StreamMethod من الميتا غير الـ createZombie يعني المود ما راح يطلع زومبي في كل الماب و الزومبي راح يطلع عن طريق الفنكشن و حط الأحداثيات الي تبي يطلع فيها الزومبي createZombie بعدها أستخدم الفنكشن exports.zombies:createZombie(x, y, z, 0, skinID) و أضن تقدر تسويه عن طريق ماب أديتور كمان لـ رقم 2 StreamMethod بالميتا غير الـ
  7. function onBh() triggerServerEvent("spawnHim1",localPlayer) showCursor(false) guiSetVisible(NussaifWindows,false) triggerServerEvent("onGetVeh",localPlayer) triggerServerEvent("onGetVeh",localPlayer) end addEventHandler ( "onClientResourceStart", onBh ) https://wiki.multitheftauto.com/wiki/AddEventHandler attachedTo: The element you wish to attach the handler to. The handler will only be called when the event it is attached to is triggered for this element, or one of its children. Often, this can be the root element (meaning the handler will be called when the event is triggered for any element).
  8. this was just an example, ive got a script which uses an event making the player the source Anything come from outside the function that are inside the timer, and not global (local) or source from an event, you will need to pass it. -- you sholud have event here setTimer(function(source) local x, y, z = getElementVelocity(object) -- object is global? if not you need to pass it too. outputChatBox(x..", "..y..", "..z, source) end,100,0,source)
  9. local pick = createPickup(0,0,3,3,1550) addEventHandler("onPickupHit", pick, function(hitPlayer) if (getTeamName(getPlayerTeam(hitPlayer)) == "M") then destroyElement(pick) givePlayerMoney(hitPlayer, 2000) else cancelEvent() end end)
  10. قصدك تبي إذا كان اللاعب في التيم يختفي الباك أب + يعطيه فلوس بس إذا ما كان في التيم ما يختفي الباك أب + ما يعطيه فلوس ؟
  11. https://wiki.multitheftauto.com/wiki/CreateVehicle
  12. TAPL

    Correct code

    When you with/without a car, you want same blip?
  13. شوف كودك أول fadeCamera( thePlayer, false ) + من وين جاي thePlayer + أنت تسوي التكست كل ما يخش لاعب؟ + عشان تضيف لاعب للتكست textDisplayAddObserver أنت ما أستخدمت الفنكشن !عشان تحذفه؟ textDisplayRemoveObserver مع أنك تستخدم !و كود طلال خارج الموضوع نهائياً
  14. You will need to pass an argument because "source" is not defined here.
  15. انت يوم قلت صلحتها ضغطت اشوف وش سويت كنت حاط player في السطر الثالث بعدين ترى الخطأ كلمة ... معقولة ما لاحظته !! عندك صعوبة في فهم الخطأ؟ بما أنك ما شاء الله مبرمج محترف و تكشف الأخطاء ..ما يحتاج تطول الموضوع و تسوي سالفه و الخ حط الخطأ مع التصحيح أو الزم الهدوء
  16. skins = { {"Sweet", 270}, {"Hooded Hobo", 230}, {"Hooded Hobo", 230}, {"Ryder", 300} } addCommandHandler("skin", function(player) setElementModel(player, skins[math.random(#skins)][2]) end)
  17. TAPL

    Correct code

    myonlake, you forgot this: if getPlayerSerial(getVehicleController(vehicle)) == "" then if getPlayerSerial(getVehicleController(vehicle)) == serial then
  18. addEventHandler("onClientMarkerHit", root, function(hitElement) if source == theMarker and getElementType(hitElement) == "player" and (hitElement == localPlayer) then triggerServerEvent("SOSO", localPlayer, localPlayer) end end) addEvent("SOSO", true) addEventHandler("SOSO", root, function(player) if getElementType(player) == "player" and not isPedInVehicle(player) then if isElement(vehicle[player]) then destroyElement(vehicle[player]) vehicle[player] = nil end local x, y, z = getElementPosition(player) vehicle[player] = createVehicle(411, x, y, z) warpPedIntoVehicle(player, vehicle[player]) end end)
  19. طيب ليه مسويه كلنت بالضبط؟ أيش السبب
  20. وين الماركر؟ و أنت مسويه سيرفر و إلا كلينت؟
  21. TAPL

    guiGetVisible

    musicwindow = guiCreateWindow(0, 0, 461, 336, "Music Player", false) guiSetVisible(musicwindow, false) checkbox1 = guiCreateCheckBox(190, 285, 91, 31, "Enable Replay", true, false, musicwindow) edit1 = guiCreateEdit(20, 75, 421, 21, "", false, musicwindow) guiEditSetMaxLength(edit1, 32767) label2 = guiCreateLabel(20, 55, 141, 16, "Insert your Music Link here:", false, musicwindow) guiLabelSetHorizontalAlign(label2, "left", false, musicwindow) guiLabelSetVerticalAlign(label2, "center") label1 = guiCreateLabel(170, 25, 81, 16, "CIT Music Player", false, musicwindow) guiLabelSetHorizontalAlign(label1, "left", false) guiLabelSetVerticalAlign(label1, "center") gridlist1 = guiCreateGridList(20, 145, 421, 121, false, musicwindow) button1 = guiCreateButton(20, 105, 81, 31, "Add To Playlist", false, musicwindow) button2 = guiCreateButton(70, 285, 51, 31, "Play", false, musicwindow) button3 = guiCreateButton(130, 285, 51, 31, "Stop", false, musicwindow) button4 = guiCreateButton(280, 285, 41, 31, "-", false, musicwindow) button5 = guiCreateButton(330, 285, 41, 31, "+", false, musicwindow) bindKey("F10", "down", function() guiSetVisible(musicwindow, not guiGetVisible(musicwindow)) showCursor(guiGetVisible(musicwindow)) end) You have forgot relative and parent arguments and more..
  22. I guess that you want to do something like that? addEventHandler("onPlayerLogin", root, function(_, acc) for i,v in ipairs(getElementsByType("player")) do if (getPlayerGangName(v) == getPlayerGangName(source)) then triggerClientEvent(v, "memberLoggedIn", v, getAccountName(acc), getPlayerName(source)) end end end) otherwise, try to explain better.
  23. https://wiki.multitheftauto.com/wiki/OnBan أو https://wiki.multitheftauto.com/wiki/OnPlayerBan + https://wiki.multitheftauto.com/wiki/GetTickCount https://wiki.multitheftauto.com/wiki/BanPlayer
  24. https://wiki.multitheftauto.com/wiki/OnPlayerJoin Parameters No parameters. thePlayer مدري من وين جبت
×
×
  • Create New...