Jump to content

TAPL

Retired Staff
  • Posts

    7,337
  • Joined

  • Days Won

    11

Everything posted by TAPL

  1. getRandomPlayer setElementPosition onPlayerWasted
  2. createMarker onClientMarkerHit setElementPosition
  3. هو طلب يحذفون المود https://forum.multitheftauto.com/viewtopic.php?f=150&t=45807&p=759270#p759270
  4. TAPL

    Kill timer

    onPlayerWasted is server side..
  5. local AllowedGroups = { "Admin", "SuperModerator", "Moderator" } addEventHandler("onPlayerCommand", root, function(cmd) if cmd == "ss" then local account = getPlayerAccount(source) local hasPermission if account and not isGuestAccount(account) then local accName = getAccountName(account) for _, groupName in ipairs(AllowedGroups) do local group = aclGetGroup(groupName) if group then if isObjectInACLGroup("user."..accName, group) then hasPermission = true break end end end end if not hasPermission then cancelEvent() end end end)
  6. TAPL

    ?

    تقدر تسويه مختصر اكثر بسطر واحد: addEventHandler("onClientPedDamage", root, cancelEvent)
  7. TAPL

    Help Me.

    DjKim = guiCreateLabel(0.49, 0.81, 0.20, 0.03, "DJ:", true) guiSetText(DjKim, "DJ: "..getPlayerName(localPlayer))
  8. 3D calculate the distance with the height (z), 2D don't include the height.
  9. getPlayerMoney client side does not require argument and it only return the money the local player has.
  10. true عشان تستخدم ارقام 0 - 1 لازم تحط
  11. كمل بنفس الموضوع لا تفتح جديد https://forum.multitheftauto.com/viewtopic.php?f=160&t=92570&p=833232
  12. حط محاولتك عشان نشوف ايش الأخطاء
  13. ممكن تقول لنا الأرقمنت الاول وين تعريفه ؟ client ?? https://wiki.multitheftauto.com/wiki/AddEventHandler https://wiki.multitheftauto.com/wiki/Predefined_variables_list
  14. عندك خطأ بأسم الحدث onClientGUICLick onClientGUIClick
  15. addEventHandler("onClientGUICLick",root, function () if source == GUIEditor.button[1] then setElementHealth(localPlayer, 200) end end )
  16. كل فنكشن فيه امثله بالويكي هذا مثال من فنكشن getPlayersInTeam function killTeamFunction ( thePlayer, command, teamName ) -- Find and kill all the players in the team that was specified with the console command local theTeam = getTeamFromName ( teamName ) if ( theTeam ) then local players = getPlayersInTeam ( theTeam ) -- Loop through the player table for playerKey, playerValue in ipairs ( players ) do -- kill the player killPlayer ( playerValue ) end end end addCommandHandler ( "killTeam", killTeamFunction )
  17. TAPL

    Doesnt work

    The grid list is client side which mean it on your computer. You will need to use trigger to server side and then trigger back to client side for all players.
  18. جرب استبدل (127) السطر ذا local extent = dxGetTextWidth ( self.strText, self.fScale, self.strFont ) بـ هذا local extent = dxGetTextWidth ( string.gsub(self.strText, "#%x%x%x%x%x%x", ""), self.fScale, self.strFont )
  19. function spawnrevive() local x,y,z = getElementPosition(source) spawnPlayer(source,x,y,z) end addEvent("ClientSpawnPlayer",true) addEventHandler("ClientSpawnPlayer",root,spawnrevive)
  20. TAPL

    Doesnt work

    function adduser_func ( cmd, target ) local target = getPlayerFromPartialName ( target ) if target then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, column, getPlayerName(target), false, false) outputChatBox("Player has been added to F5 menu sucessfully.", 0, 255, 0) else outputChatBox("* Player not found.", 255, 0, 0) end end addCommandHandler ( "adduser", adduser_func )
×
×
  • Create New...