Jump to content

abu5lf

Members
  • Posts

    2,193
  • Joined

  • Last visited

Everything posted by abu5lf

  1. abu5lf

    [HELP] problem

    local index, theBoat; for index, theBoat in ipairs ( getElementsByType 'vehicle' ) do if ( getElementModel( theBoat ) == 453 ) then setElementData( theBoat, 'fishboat', true ) setElementData( theBoat, 'fishes', 0 ) end end finish = createMarker( 971.8, -2103.6, 2.2,"cylinder", 2, 0, 0, 255, 155) FishingMinigameBlip = createBlipAttachedTo ( finish, 9, 2, 0, 0, 255, 255, 0, 250, getRootElement() ) addEventHandler( 'onMarkerHit', finish, function( hit ) if ( getElementType( hit ) == 'player' ) then local fishes = getElementData( hit , 'FishPlayer' ) or 0 outputChatBox( 'You have sold '..fishes..' fishes and earned $'.. fishes * 3, thePlayer ) givePlayerMoney( hit, fishes * 3 ) setElementData( hit, 'FishPlayer', 0 ) end end ) addEventHandler( 'onVehicleEnter', getRootElement( ), function( thePlayer ) if getElementData( source, 'fishboat' ) then triggerClientEvent( thePlayer, 'enableFishermanMission', thePlayer ) end end ) addEventHandler ( 'onVehicleExit', getRootElement( ), function( thePlayer ) if getElementData( source, 'fishboat' ) then triggerClientEvent( thePlayer, 'disableFishermanMission', thePlayer ) setElementData( thePlayer, 'FishPlayer', getElementData( source , 'fishes' ) or 0 ) setElementData( source, 'fishes', 0 ) end end )
  2. abu5lf

    [HELP] problem

    Client Side Timer = {} function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end addEvent( 'enableFishermanMission', true ) addEventHandler( 'enableFishermanMission', getRootElement( ), function( ) if ( source == localPlayer ) then addEventHandler( 'onClientRender', getRootElement( ), FishermanGUIText ) Timer[localPlayer] = setTimer( checkfishesbleh, 5000, 0 ) end end ) function checkfishesbleh( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then local aSpeed = getElementSpeed( vehicle, 'kph' ) local curfish = getElementData( vehicle, 'fishes' ) or 0 if ( curfish > 499 ) then setElementData( vehicle, 'fishes', 500 ) else if ( aSpeed >= 20 ) then setElementData( vehicle, 'fishes', ( curfish + math.random( 4 ) ) ) end end end end addEvent( 'disableFishermanMission', true ) addEventHandler( 'disableFishermanMission', getRootElement( ), function() if ( source == localPlayer ) then removeEventHandler( 'onClientRender', getRootElement( ),FishermanGUIText ) killTimer( Timer[localPlayer] ) end end ) Server Side local index, theBoat; for index,theBoat in ipairs ( getElementsByType ( "vehicle" ) ) do if ( getElementModel( theBoat ) == 453 ) then setElementData( theBoat, 'fishboat', true ) setElementData( theBoat, 'fishes', 0 ) end end finish = createMarker( 971.8, -2103.6, 2.2,"cylinder", 2, 0, 0, 255, 155) FishingMinigameBlip = createBlipAttachedTo ( finish, 9, 2, 0, 0, 255, 255, 0, 250, getRootElement() ) addEventHandler( 'onMarkerHit', finish, function (thePlayer) if ( getElementType( thePlayer) == 'player' ) then local fishes = getElementData( getPedOccupiedVehicle( thePlayer ), 'fishes' ) or 0 outputChatBox( 'You have sold '..fishes..' fishes and earned $'..fishes * 3,thePlayer) givePlayerMoney( thePlayer,fishes* 3 ) setElementData( thePlayer, 'fishes', 0, false ) end end ) addEventHandler( 'onVehicleEnter', getRootElement( ), function( thePlayer ) if getElementData( source,'fishboat' ) then triggerClientEvent( thePlayer, 'enableFishermanMission', thePlayer ) end end ) addEventHandler ( "onVehicleExit", getRootElement(), function( thePlayer ) if getElementData( source, 'fishboat' ) then triggerClientEvent( thePlayer, 'disableFishermanMission',thePlayer ) end end )
  3. abu5lf

    Help me

    You can use 'toggleControl' to disable 'fire' in zone.
  4. abu5lf

    [HELP] problem

    Show your trigger ''enableFishermanMission'' .
  5. abu5lf

    [HELP] problem

    function getElementSpeed(element,unit) if (unit == nil) then unit = 0 end if (isElement(element)) then local x,y,z = getElementVelocity(element) if (unit=="mph" or unit==1 or unit =='1') then return (x^2 + y^2 + z^2) ^ 0.5 * 100 else return (x^2 + y^2 + z^2) ^ 0.5 * 1.61 * 100 end else outputDebugString("Not an element. Can't get speed") return false end end addEvent( 'enableFishermanMission', true ) addEventHandler( 'enableFishermanMission', getRootElement( ), function( ) if ( source == localPlayer ) then addEventHandler( 'onClientRender', getRootElement( ), FishermanGUIText ) Timer = setTimer( checkfishesbleh, 5000, 0 ) end end ) function checkfishesbleh( ) local vehicle = getPedOccupiedVehicle( localPlayer ) if ( vehicle ) then local aSpeed = getElementSpeed( vehicle, 'kph' ) local curfish = getElementData( vehicle, 'fishes' ) or 0 if ( curfish > 499 ) then setElementData( vehicle, 'fishes', 500 ) else if ( aSpeed >= 20 ) then setElementData( vehicle, 'fishes', ( curfish + math.random( 4 ) ) ) end end end end Try This, not tested.
  6. abu5lf

    [HELP] problem

    You have a '(' extra, and 'getheVehicleSpeed' There are no argument.
  7. بوه طريقة أكثر اختصار من هآذي aWeapon = { [ 38 ] = true; } if aWeapon [ weapon ] then -- وتكملة الكود هنا end
  8. GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(196,184,766,550,"shop panel by 1",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,21,748,520,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("info",GUIEditor_TabPanel[1]) GUIEditor_Tab[2] = guiCreateTab("shop",GUIEditor_TabPanel[1]) GUIEditor_Tab[3] = guiCreateTab("Free Car",GUIEditor_TabPanel[1]) GUIEditor_Tab[4] = guiCreateTab("Send Money",GUIEditor_TabPanel[1]) GUIEditor_Tab[5] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Tab[6] = guiCreateTab("Login/Register",GUIEditor_TabPanel[1]) GUIEditor_Tab[7] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(77,319,119,0,"",false) GUIEditor_Button[1] = guiCreateButton(77,319,119,0,"",false,GUIEditor_Tab[3]) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,24,744,515,false,GUIEditor_Tab[3]) GUIEditor_Tab[1] = guiCreateTab("سيارات كشخة",GUIEditor_TabPanel[1]) GUIEditor_Button[2] = guiCreateButton(57,411,132,36,"وحش البايسن",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(314,411,132,36,"همر",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(559,411,132,36,"لمبرغيني",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(57,188,132,36,"هوندا",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(314,191,132,36,"كامري",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(559,191,132,36,"زد/28",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("حكومة",GUIEditor_TabPanel[1]) GUIEditor_Button[8] = guiCreateButton(57,411,132,36,"جيب",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(314,411,132,36,"مصفحة",false,GUIEditor_Tab[2]) GUIEditor_Button[10] = guiCreateButton(559,411,132,36,"هليكوبتر",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(559,191,132,36,"موتر سيكل",false,GUIEditor_Tab[2]) GUIEditor_Button[12] = guiCreateButton(314,191,132,36,"إطفاء",false,GUIEditor_Tab[2]) GUIEditor_Button[13] = guiCreateButton(57,188,132,36,"إسعاف",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("مواتر سياكل",GUIEditor_TabPanel[1]) GUIEditor_Tab[4] = guiCreateTab("طائرات",GUIEditor_TabPanel[1]) ======== حمل البرنامج هذا أفضل لك http://notepad-plus-plus.org/
  9. GUIEditor_Window = {} GUIEditor_TabPanel = {} GUIEditor_Tab = {} GUIEditor_Button = {} GUIEditor_Window[1] = guiCreateWindow(196,184,766,550,"shop panel by 1",false) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,21,748,520,false,GUIEditor_Window[1]) GUIEditor_Tab[1] = guiCreateTab("info",GUIEditor_TabPanel[1]) GUIEditor_Tab[2] = guiCreateTab("shop",GUIEditor_TabPanel[1]) GUIEditor_Tab[3] = guiCreateTab("Free Car",GUIEditor_TabPanel[1]) GUIEditor_Tab[4] = guiCreateTab("Send Money",GUIEditor_TabPanel[1]) GUIEditor_Tab[5] = guiCreateTab("Rules",GUIEditor_TabPanel[1]) GUIEditor_Tab[6] = guiCreateTab("Login/Register",GUIEditor_TabPanel[1]) GUIEditor_Tab[7] = guiCreateTab("Tab",GUIEditor_TabPanel[1]) GUIEditor_Button[1] = guiCreateButton(77,319,119,0,"",false) GUIEditor_Button[1] = guiCreateButton(77,319,119,0,"",false,GUIEditor_Tab[3]) GUIEditor_TabPanel[1] = guiCreateTabPanel(9,24,744,515,false,GUIEditor_Tab[3]) GUIEditor_Tab[1] = guiCreateTab("سيارات كشخة",GUIEditor_TabPanel[1]) GUIEditor_Button[2] = guiCreateButton(57,411,132,36,"وحش البايسن",false,GUIEditor_Tab[1]) GUIEditor_Button[3] = guiCreateButton(314,411,132,36,"همر",false,GUIEditor_Tab[1]) GUIEditor_Button[4] = guiCreateButton(559,411,132,36,"لمبرغيني",false,GUIEditor_Tab[1]) GUIEditor_Button[5] = guiCreateButton(57,188,132,36,"هوندا",false,GUIEditor_Tab[1]) GUIEditor_Button[6] = guiCreateButton(314,191,132,36,"كامري",false,GUIEditor_Tab[1]) GUIEditor_Button[7] = guiCreateButton(559,191,132,36,"زد/28",false,GUIEditor_Tab[1]) GUIEditor_Tab[2] = guiCreateTab("حكومة",GUIEditor_TabPanel[1]) GUIEditor_Button[8] = guiCreateButton(57,411,132,36,"جيب",false,GUIEditor_Tab[2]) GUIEditor_Button[9] = guiCreateButton(314,411,132,36,"مصفحة",false,GUIEditor_Tab[2]) GUIEditor_Button[10] = guiCreateButton(559,411,132,36,"هليكوبتر",false,GUIEditor_Tab[2]) GUIEditor_Button[11] = guiCreateButton(559,191,132,36,"موتر سيكل",false,GUIEditor_Tab[2]) GUIEditor_Button[12] = guiCreateButton(314,191,132,36,"إطفاء",false,GUIEditor_Tab[2]) GUIEditor_Button[13] = guiCreateButton(57,188,132,36,"إسعاف",false,GUIEditor_Tab[2]) GUIEditor_Tab[3] = guiCreateTab("مواتر سياكل",GUIEditor_TabPanel[1]) GUIEditor_Tab[4] = guiCreateTab("طائرات",GUIEditor_TabPanel[1]) "مواتر سياكل"
  10. وين اضيفه وكيف احدد الايدت ؟ حطه اول ماتفتح النافذة
  11. هلاوسسهلا. كم مرة قلتها في الموضوع
  12. أنت ليه ماتجرب بنفسك وتعتمد على نفسك وتعرف الخطأ /debugscript 3
  13. createExplosion onClientPlayerWeaponFire
  14. يعني مهب لازم ثلاث لاعبين في الماركر؟
  15. يعني اذا كانوا ثلاثة لاعبين داخل الماركر تتنفذ او تعني اذا ثلاثة لاعبين لمسوا الماركر وخرجوا تتنفذ الوظيفة ؟
  16. انا مافهمت شيء من الموضوع غير من كلام SOSO ان القائمة ماتظهر لك اضغط كلك يمين
  17. اغبى هههههههههههههه setGameSpeed ههههه ههذا لتسريع لالعبة مو للاعب اذا حطيته كلنت يصير للأعب بس شف الموضوع هذا : viewtopic.php?f=119&t=50118&p=490309&hilit=setGameSpeed#p490309
  18. اغبى هههههههههههههه setGameSpeed
×
×
  • Create New...