Jump to content

HassoN

Members
  • Posts

    636
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by HassoN

  1. اطلع وادخل من السيرفر ، الحدث عند دخول اللاعب
  2. فيه شي جنب سطر 8 مخفي بسبب انك سويت كوبي للكود من المنتدى ، روح ع سطر 8 وحاول تمسح راح تلاقي شي ينمسح وخلاص
  3. function setAnimation(player) setPedAnimation(player, "DANCING", "DAN_Loop_A") end function onLogin() bindKey(source, "F9", "down", setAnimation) end addEventHandler("onPlayerJoin", root, onLogin)
  4. ??? حسب ملاحظتي ماشفت شي غلط ، بس ما اقدر أكد لك 100% ، انا مو كومبيوتر
  5. الكود بيرجع رتبة اللاعب ولو مامعه رتبة من الجدول بيرجع "Player"
  6. Settings > Interface > Presets Next time post it somewhere else but in Scripting section.
  7. Add outputChatBox(tostring(getElementData(getLocalPlayer(),ammoName)-1)) After line 5 to check if the ammo actually goes down. If it does, then the problem comes from the event when you switch to the gun, show us the code. If it doesn't go down, that means that there's a problem from your function "getWeaponAmmoType2" or somewhere else not shown in the code.
  8. Use onPlayerCommand then cancel the command you want.
  9. مو مجرب local ranksNumbers = { {1,"Console","ConsoleData"}, {2,"Console2","Console2D"}, {3,"Admins","Admins29"}, } function isRank(player,rank) local playerAccount = getPlayerAccount ( player ) local groups = aclGetAccountGroups( playerAccount) if not isGuestAccount ( playerAccount ) then for i, v in ipairs(groups) do local index = getIndexFromValue(v) if index then local otherIndex = getIndexFromValue(rank) if (index <= otherIndex) then status = true return status end end end if (not status) then return false end end end addCommandHandler("checkRank", function(source) local result = isRank(source,"Console2") outputChatBox(tostring(result)) end ) function getIndexFromValue(value) for i, v in ipairs(ranksNumbers) do if v[2] == value then return v[1] end end end function aclGetAccountGroups ( account ) local acc = getAccountName ( account ) if ( not acc ) then return false end local res = {} acc = "user."..acc local all = "user.*" for ig, group in ipairs ( aclGroupList() ) do for io, object in ipairs ( aclGroupListObjects ( group ) ) do if ( ( acc == object ) or ( all == object ) ) then table.insert ( res, aclGroupGetName ( group ) ) break end end end return res end
  10. createRadarArea -- تسوي شكل المنطقة ع الخريطة createColRectangle -- تسوي المنطقة onColShapeHit -- حدث عند دخول المنطقة getElementType -- تتاكد انه زومبي killPed or destroyElement -- تموت الزومبي
  11. Have you tried to use 'setGameSpeed' in client side once you give a walking style to a player? That'd change the speed of a certain player but not for everyone.
  12. HassoN

    Help Me Please

    Obviously 'Setting.Lua' is missing. Either you remove it from the meta or add it to the folder of the resource to get your resource running.
  13. For first case, you are not forced to use 'player' you may use any variable you wish. 2nd case, you are forced to use 'source' only in case if you are using an event (for example 'onPlayerJoin') so the player is the source of that event.
  14. HassoN

    Help Me Please

    Posting the whole resource and asking us to find the problem is not going to work out. Use /debugscript 3 then run the resource and give us the error message along with the concerned code.
  15. sW = عرض شاشة اللاعب sH = طول شاشة اللاعب
  16. https://wiki.multitheftauto.com/wiki/SmoothMoveCamera
  17. Meta: <meta> <info author="FMD Battlefield" version="1.0" type="script" /> <script src="walkstyle.Lua" type="client" /> </meta> Lua function onClientResourceStart() setPedWalkingStyle(localPlayer,126) end addEventHandler("onClientResourceStart",resourceRoot, onClientResourceStart)
  18. Ugh, can you explain better? I don't get your question.
  19. HassoN

    Spawn car

    Use addEventHandler -- "onPlayerMarkerHit" getPedOccupiedVehicle destroyElement
  20. HassoN

    Spawn car

    Use: createVehicle -- create the vehicle warpPedIntoVehicle -- warp player into the vehicle.
  21. شغل مود runcode وبعدها استعمل srun aclGroupAddObject (aclGetGroup("Admin"), "user.HELLO") -- عشان تضيف srun aclGroupRemoveObject (aclGetGroup("Admin"), "user.HELLO") -- عشان تشيل
  22. Try to do something with the following: ? addEventHandler -- onClientRender isPedInVehicle -- check if player in vehicle getPedOccupiedVehicle -- to get player's vehicle getElementVelocity -- to get vehicle's speed dxDrawImage -- to draw your speedometer
×
×
  • Create New...