Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    طلب كود

    MyName = "اسمك هنا" MySerial = "سيريالك هنا" addEventHandler("onPlayerJoin", root, function() if getPlayerName(source) == MyName and getPlayerSerial(source) ~= MySerial then banPlayer(source, false, false, true, root, "سبب الباند هنا") end end)
  2. ممكن تقول لي ايش هو؟
  3. ما ظبط تعرف أيش هو الحدث؟
  4. -- Client Side -- PoliceImage = guiCreateStaticImage(500, 450, 200, 200, "w.png", false) GroveImage = guiCreateStaticImage(0, 450, 200, 200, "s.png", false) showCursor(true) function onImageClick() if source == PoliceImage then triggerServerEvent("setTeam", localPlayer, "Police") elseif source == GroveImage then triggerServerEvent("setTeam", localPlayer, "Grove") end guiSetVisible(PoliceImage, false) guiSetVisible(GroveImage, false) showCursor(false) end addEventHandler("onClientGUIClick", resourceRoot, onImageClick) bindKey("F4", "down", function() if not guiGetVisible(PoliceImage) then guiSetVisible(PoliceImage, true) guiSetVisible(GroveImage, true) showCursor(true) end end) -- Server Side -- PoliceTeam = createTeam("Police", 0, 255, 0) GroveTeam = createTeam("Grove", 0, 255, 0) addEvent("setTeam", true ) addEventHandler("setTeam", root, function(Team) if Team == "Police" then spawnPlayer(source, 1473.86, -2228.3, 13.4, 0, 2, 0, 0, PoliceTeam) giveWeapon(source, 31, 200) elseif Team == "Grove" then spawnPlayer(source, 1473.86, -2228.3, 13.4, 0, 2, 0, 0, GroveTeam) giveWeapon(source, 31, 200) end fadeCamera(source, true) setCameraTarget(source) end) -- Meta.xml -- "setTeams" author="ha7soon" type="gamemode" />
  5. What line? Post your code after the fix. EDIT: you have "Cylinder" instead of "cylinder" local jailMark = createMarker( 1799.9298095703, -1584.1966552734, 13.488187789917, "Cylinder" , 1.5, 0, 0, 255, 150 ) Should be local jailMark = createMarker( 1799.9298095703, -1584.1966552734, 13.488187789917, "cylinder" , 1.5, 0, 0, 255, 150 )
  6. حط كودك
  7. setPlayerWantedLevel getPlayerWantedLevel
  8. Could you post a screenshot of this?
  9. deleteResource هي المودات الي تم حذفها عن طريق الكود trash الملفات الي داخل المجلد Resources طبعاً خاصية حذف المودات موجوده في لوحة الأدمنية آخر أصدار في تاب و السيرفر شغال ما يسبب أي مشكلة trash حذف الملفات الي في المجلد
  10. it's already jailMark in his script. @Monty, You are using client side event (onClientMarkerHit) in server side script, change it to (onMarkerHit). Also you have wrong argument, source in (lines 92 and 93) is the marker that got hit by the player, so it should be theprisoner not source.
  11. Why do you need this? setVehicleIdleRespawnDelay is already do the same thing.
  12. resource-cache الفقره الأولى تشمل كل المجلدات الموجوده داخل المجلد في حاله أنك حذفت ذي الملفات و السيرفر شغال المشكلة المتوقعه هي أن التحميل ما راح يمشي
  13. i guess you have the other gate from map file/map editor. About the command, you can use addCommandHandler and make sure the script knew if the gate is moving or not, as myonlake told you.
  14. لا تنسى الملاحظة ذي https://wiki.multitheftauto.com/wiki/SpawnPlayer
  15. TAPL

    Point System

    Oh my god. How do you think he'll load points when player join then? you kidding me?
  16. phq1 = createObject ( 968, 1544.699, -1630.798, 13.100, 0, 90, 90 ) phq1col = createColCircle ( 1542.699, -1630.798, 13.100, 7 ) function openphq1(thePlayer) if getElementModel( thePlayer ) == 0 then moveObject(phq1, 968, 1544.699, -1630.798, 13.100, 0, -90) end end addEventHandler( "onColShapeHit", phq1col, openphq1 ) function closephq1(thePlayer) if getElementModel( thePlayer ) == 0 then moveObject(phq1, 968, 1544.699, -1630.798, 13.100, 0, 90) end end addEventHandler( "onColShapeLeave", phq1col, closephq1 )
  17. TAPL

    Point System

    He wants when player rejoin server, not quit. rejoin means (quit and join) Simply all you need is save the points in the account when the player quit, and load it from the account when the player login. There no need for onPlayerJoin unless you going make a system to save the player serial and its points in (xml, sql, mysql) then it going be a waste of time and effort.
  18. TAPL

    Point System

    i don't think onPlayerJoin is needed. You need onPlayerQuit. Use these function to save/load the points. setAccountData getAccountData getPlayerAccount
  19. Image = guiCreateStaticImage(500, 450, 250, 250, "w.png", false) showCursor(true) function onImageClick() triggerServerEvent("setTeam", localPlayer) guiSetVisible(Image, false) showCursor(false) end addEventHandler("onClientGUIClick", Image, onImageClick) bindKey("F9", "down", function() if not guiGetVisible(Image) then guiSetVisible(Image, true) showCursor(true) end end) team = createTeam("team", 0, 0, 0) addEvent("setTeam",true) addEventHandler("setTeam", root, function() setPlayerTeam(source, team) end)
  20. TAPL

    GUI

    showCursor not needed while using guiSetInputEnabled, because it will show the cursor already.
  21. startCamera = { {1320.6896972656, -951.76672363281, 100.9468614891, 1364.1717529297, -800.80603027344, 75.560821533203}, {149.31686401367, 2386.1716308594, 65.455644607544, 400.84384155273, 2528.552734375, 16.574115753174}, {966.36157226563, 2589.4494628906, 10.156999588013, 966.626953125, 2588.5498046875, 10.503839492798, 0.7}, {-2770.24, -1133.92, 38.14, -2881.06, -907.75, 9.301} } function createCameraMatrix () startCameraTimer = setTimer(function() local x, y, z, xx, yy, zz = unpack(startCamera[math.random(#startCamera)]) setCameraMatrix(x, y, z, xx, yy, zz) end,5000,0) end function destroyCameraMatrix () if isTimer(startCameraTimer) then killTimer(startCameraTimer) end setCameraTarget(localPlayer) end addEventHandler("onClientResourceStart", resourceRoot, function() --Settings createCameraMatrix () end)
  22. Both are same, but you have to read this: -- Functions for backward compatibility only -- DO NOT USE THESE AS THEY WILL BE REMOVED IN A LITTLE WHILE -- function isPlayerMuted ( player ) return isPlayerVoiceMuted ( player ) end function setPlayerMuted ( player, muted ) return setPlayerVoiceMuted ( player, muted ) end -- DO NOT USE THESE AS THEY WILL BE REMOVED IN A LITTLE WHILE --
  23. حط كودك كامل و أشرح ايش الي تبي تسويه بالضبط
  24. addEvent("NewName", true) addEventHandler("NewName", root, function(playerName) setPlayerName( source , playerName ) outputChatBox("You Have Changed Your Nick !",source,255,255,0,true) end)
×
×
  • Create New...