Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    Join flood error

    Happen to me several times, even though i was just started my local server and my mta and didn't join any other server. Haven't seen this problem for a while now, not sure if it been fixed or something.
  2. TAPL

    Garage id

    ID:7 LowRider Tuning Garage in Willowfield 2645,-2033,14
  3. TAPL

    onClientRender

    function speed (player) if player == localPlayer then addEventHandler ( "onClientRender", root, draw ) end end addEventHandler ("onClientVehicleEnter", root, speed) function hideSpeed (player) if player == localPlayer then removeEventHandler ( "onClientRender", root, draw ) end end addEventHandler("onClientVehicleExit", root, hideSpeed) function draw ( ) --this is where I have dxdraw stuff. end
  4. You should use guiSetText instead of creating new label.
  5. I test the code and everything work fine.
  6. executeCommandHandler client side cannot execute server side commands.
  7. You wasted your time then because it wrong and even if it was correct, if you restart the script everything will lost.
  8. TAPL

    Functions.

    https://wiki.multitheftauto.com/wiki/DxDrawRectangle
  9. TAPL

    (Fixed)

    Your button variable is the same as the function name, you must change it, also please note currently only the up state is supported.
  10. local barrier = {} function createBarrier(thePlayer) local team = getPlayerTeam(thePlayer) if (team and getTeamName(team) == "Unique") and not isElement(barrier[thePlayer]) then local nX, nY, nZ = getElementPosition(thePlayer) local nX2, nY2 = 0, 0 local nZ2 = getPedRotation(thePlayer) barrier[thePlayer] = createObject(3578, nX, nY, nZ - 0.2, 0, 0, nZ2) setElementPosition(thePlayer, nX, nY, nZ + 1) end end addCommandHandler("b", createBarrier) function removeBarrier(thePlayer) if isElement(barrier[thePlayer]) then destroyElement(barrier[thePlayer]) barrier[thePlayer] = nil end end addCommandHandler("r", removeBarrier) addEventHandler("onPlayerQuit", root, function() if isElement(barrier[source]) then destroyElement(barrier[source]) barrier[source] = nil end end)
  11. Use timestamp.
  12. ^^ هريس Event: "onClientGUIClick" triggerServerEvent createTeam spawnPlayer setCameraTarget fadeCamera
  13. التيبل معرف؟
  14. local marker1 = createMarker(2759.88, -2015.33, 12.9, "cylinder", 0.75, 0, 252, 0) local marker2 = createMarker(x, y, z, "cylinder", 0.75, 0, 252, 0) -- عدل الأحداثيات addEventHandler("onResourceStart", resourceRoot, function() for _, p in ipairs(getElementsByType("player")) do bindKey(p, "h", "down", Animation) end end) addEventHandler("onPlayerJoin", root, function() bindKey(source, "h", "down", Animation) end) function Animation(player) if isElementWithinMarker(player, marker1) or isElementWithinMarker(player, marker2) then setElementFrozen(player, true) setTimer(setElementFrozen, 5500, 1, player, false) setPedAnimation(player, "FOOD", "EAT_Burger", _, false, _, _, false) end end
  15. TAPL

    Team Spawn Help

    Click on the function there is examples on the wiki.
  16. TAPL

    Team Spawn Help

    spawnPlayer
  17. TAPL

    tables

    Try this: addEvent( "modShop_playerLeaveModShop", true ) addEventHandler( "modShop_playerLeaveModShop", getRootElement( ), function( vehicle, itemsCost, upgrades, colors, paintjob, shopName ) local pMoney = getPlayerMoney( source ) local account = getPlayerAccount(source) if pMoney >= itemsCost and account then modTheVehicle( vehicle, upgrades, colors, paintjob, shopName ) takePlayerMoney( source, itemsCost ) triggerClientEvent( source, "modShop_moddingConfirmed", source ) local myTable = {} for i, ups in ipairs (upgrades) do table.insert ( myTable, ups ) end setAccountData (account, "cu",toJSON (myTable)) else outputChatBox( "#FF0000Inufficient founds! #00FF00Your pocket shows $"..tostring( getPlayerMoney( source ) )..".#FFFFFF Uninstall some upgrades.", source, 0,0,0,true) end end )
  18. TAPL

    tables

    You don't need unpack, IIYAMA explained what it does. Why you even trying to unpack it, you can save upgrades table as JSON string directly.
  19. Timer? what for and why you don't try do it yourself first?
  20. gate = createObject(980, 1579, 713.6, 12.5, 0, 0, 90) -- Not quite sure if the rotation should be 0 else edit it nottrue = false addCommandHandler("gate", function (thePlayer) local team = getPlayerTeam (thePlayer) if ( team and getTeamName ( team ) == "The Montana Family" ) then local x, y, z = getElementPosition(thePlayer) local distance = getDistanceBetweenPoints3D (x, y, z, 1579, 713.6, 12.5) if distance < 35 then if (nottrue == true) then moveObject( gate, 2000, 1579, 713.6, 12.5 ) nottrue = false elseif (nottrue == false) then moveObject( gate, 2000, 1579, 713.6, 7 ) nottrue = true end end else outputChatBox("Access Denied!", thePlayer, 255, 100, 0) end end)
  21. اها انت جامر يغلق
  22. استبدلهم بالمتغير الي عندك
  23. يعني أنت عندك كود حالياً و الشرطي يجيه نجوم و يقدر يقتل الي ما عليه نجوم طيب حط لنا كودك!!!!!
  24. You're welcome.
  25. TAPL

    tables

    Account data can save up to 128 characters, if you have more than 128, only 128 will be saved and the rest will be lost therefore your table won't work then so you better get another way to save the string such as SQL.
×
×
  • Create New...