Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. TAPL

    some help

    function name is wrong here addEventHandler ( "onMarkerHit", checkGateMarker, onLeave ) should be: addEventHandler ( "onMarkerHit", checkGateMarker, show )
  2. TAPL

    Help, please.

    i guess you want this isObjectInACLGroup ?
  3. TAPL

    some help

    Also you need to use getElementType to make sure that what hit the marker is player.
  4. https://community.multitheftauto.com/index.php?p=resources&s=details&id=4871
  5. (كلينت (فقط function marker(hitElement) if getElementType(hitElement) == "player" then -- إذا كان الي خش الماركر لاعب if not guiGetVisible(أسم النافذه هنا) then -- إذا كانت النافذه غير ظاهره guiSetVisible(أسم النافذه هنا, true) -- أظهار النافذه showCursor(true) -- أظهار الماوس end end end addEventHandler("onClientMarkerHit", اسم الماركر هنا, marker) وكود البوابه لا تنسى تحط ذا عشان لما يخش لاعب يحط له زر تاب addEventHandler('onPlayerJoin', root, function () bindKey ( source, 'tab', 'down', AlBab ) end)
  6. متاكد "===7MoDy" version="1.0" />
  7. حط الميتا
  8. addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 15) local marker = createMarker ( 1588.5999755859, -1638, 15, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 15 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 20) end i = not i end end
  9. https://forum.multitheftauto.com/viewtopic.php?f=139&t=36010
  10. addEventHandler ( 'onResourceStart', resourceRoot, function () for index, player in ipairs ( getElementsByType ( 'player' ) ) do bindKey ( player, 'tab', 'down', AlBab ) end end ) local object = createObject ( 980, 1588.5999755859, -1638, 17.700000762939 ) local marker = createMarker ( 1588.5999755859, -1638, 17.700000762939, 'cylinder', 15.5, 0, 0, 0, 0 ) function AlBab ( player ) if ( isElementWithinMarker ( player, marker ) )then if i then moveObject ( object, 2500, 1588.5999755859, -1638, 17.700000762939 ) else moveObject ( object, 2500, 1588.5999755859, -1638, 19.700000762939 ) end i = not i end end
  11. setElementHealth ( source, getElementHealth(source) + 2 )
  12. https://forum.multitheftauto.com/viewtopic.php?f=119&t=47615#p472317
  13. TAPL

    Any way changed?

    Change this function getPlayerFromNamePart ( name ) if ( name ) then for _, player in ipairs ( getElementsByType ( "player" ) ) do local playerName = getPlayerName ( player ):gsub ( "#%x%x%x%x%x%x", "" ) if ( playerName:find ( tostring ( name ), 1, true ) ) then return player end end end return false end to function getPlayerFromNamePart ( name ) if ( name ) then for _, player in ipairs (getElementsByType("player")) do local playerName = getPlayerName(player):gsub("#%x%x%x%x%x%x", "") if (playerName:find(tostring(name), 1, true)) then return player end end end return false end and this if guiGridListGetItemText(Grid, i, Column) == old then guiGridListSetItemText(Grid, i, Column, new, false, false) to if guiGridListGetItemText(Grid, i, Column) == old:gsub("#%x%x%x%x%x%x", "") then guiGridListSetItemText(Grid, i, Column, new:gsub("#%x%x%x%x%x%x", ""), false, false)
  14. TAPL

    Any way changed?

    I have idea You can store the Player name with the hex code with this https://wiki.multitheftauto.com/wiki/GuiGridListSetItemData and then get the data with this https://wiki.multitheftauto.com/wiki/GuiGridListGetItemData
  15. TAPL

    Reset points

    if isGuestAccount ( account ) then to if not isGuestAccount ( account ) then
  16. كلينت سطر 1 + 2 + 3 + 4 مالهم داعي وهنا ما حطيت أسم للفنكشن function() local localPlayerName = getPlayerName(getLocalPlayer()) outputChatBox(localPlayerName) end ) هذا ناسخه من الويكي؟ خخ int getPlayerMoney ( ) ARMOR أو HEALTH هنا ما عندك زر أسمه addEventHandler ("onClientGUIClick", root, function() if ( source == HEALTH ) then triggerServerEvent("health", localPlayer) elseif ( source == ARMOR ) then triggerServerEvent("armor", localPlayer) end end ) مو موجود gui و جدول بالأسم gui["comboBox"] = guiCreateComboBox(50, 20, 191, 54,"Select a player to send", false,tab4) for id, player in ipairs(getElementsByType("player")) do guiComboBoxAddItem(gui["comboBox"], getPlayerName(player)) end gui["label_2"] = guiCreateLabel(6, 20, 50, 13, "player :", false,tab4) guiLabelSetHorizontalAlign(gui["label_2"], "left", false) guiLabelSetVerticalAlign(gui["label_2"], "center") guiLabelSetColor(gui["label_2"],0,255,0) gui["label_3"] = guiCreateLabel(20, 50, 50, 15, "Money :", false,tab4) guiLabelSetHorizontalAlign(gui["label_3"], "left", false) guiLabelSetVerticalAlign(gui["label_3"], "center") guiLabelSetColor(gui["label_3"],255,0,255) gui["lineEdit"] = guiCreateEdit(80, 50, 101, 20, "", false,tab4) guiEditSetMaxLength(gui["lineEdit"],8) guiLabelSetHorizontalAlign(gui["label_4"], "left", false) guiLabelSetVerticalAlign(gui["label_4"], "center") guiSetFont(gui["label_4"],"default-smalls") guiLabelSetColor(gui["label_4"],153,153,102) guiCreateStaticImage(6,160,320,70,"Send.png",false,tab4) gui["pushButton"] = guiCreateButton(40, 90, 331, 51, "Send", false,tab4) سيرفر ذولاً كلهم مالهم داعي addCommandHandler("myname", function(playerSource) outputChatBox("Your name: "..getPlayerName(playerSource), playerSource) end ) ------------------------- int/bool getPlayerMoney ( player thePlayer ) ------------------------- function checkPing() local ping = getPlayerPing(source)) if (ping > 100) then outputChatBox("Your ping is pretty high! Please try to lower it if possible.", source) end end addEventHandler("onPlayerJoin", getRootElement(), checkPing) ------------------------- function teamName ( source, key, newTeamName ) local playerTeam = getPlayerTeam ( source ) if ( playerTeam ) then local oldTeamName = getTeamName ( playerTeam ) setTeamName ( playerTeam, newTeamName ) outputChatBox ( "Changed " .. getPlayerName ( source ).."'s team name from " .. oldTeamName .. " to " .. newTeamName ) else outputChatBox ( getPlayerName ( source ) .. " isn't on a team" ) end end addCommandHandler ( "teamname", teamName )
  17. TAPL

    I need help

    https://wiki.multitheftauto.com/wiki/GivePlayerMoney https://wiki.multitheftauto.com/wiki/SetPlayerMoney
  18. Have you read the sticky topics before? https://forum.multitheftauto.com/viewtopic.php?f=91&t=31891
  19. TAPL

    I need help

    I don't know if i have understood you well, i think you mean this? addCommandHandler("cash", function(player, cmd, i) setAccountData(getPlayerAccount(player), "cash", tonumber(i)) end)
  20. https://wiki.multitheftauto.com/wiki/SetGameType
  21. https://wiki.multitheftauto.com/wiki/OnPlayerChat
  22. TAPL

    Any way changed?

    I gusse that because you're removing the hex code from the player name, and function getPlayerFromName must fit the name.
  23. https://forum.multitheftauto.com/viewtopic.php?f=91&t=47535 https://community.multitheftauto.com/index.php?p=resources&s=details&id=5613
  24. TAPL

    Need double help

    Your code should work, but anyway it will do the same as the timer lol When you select anything and any player join/quit/changeNick, you will lose what you select and the scroll bar will back to top again. This will be annoying when you search/looking for a specific name. I prefer updating the players list when opening the windows or the code that i post.
  25. TAPL

    Need double help

    You're welcome.
×
×
  • Create New...