Jump to content

SkiZo

Members
  • Posts

    114
  • Joined

  • Last visited

Everything posted by SkiZo

  1. SkiZo

    DxTimer

    Hello, everyone should see the Timer.. and dx timers always in client Side how i will make it in server ??? !
  2. Nice Work keep it on. Good luck . i have question can you tell me what's car is that ? name ? long time looking for it http://prntscr.com/jz8eeh
  3. SkiZo

    DxTimer

    So I created this Fonction wich is spawn timer.. what ever .. when i reconnect the timer gone . ? how can i fix it ? function bag.dx() if not isTimer(bag.timer) then removeEventHandler("onClientRender", root, bag.dx); return end local clock = convertToClock(bag.timer) dxDrawText("Time Left: "..clock, timerX, timerY, timerX+timerW, timerY+timerH, tocolor(255,255,255,225), 1, "default-bold", "left", "center") end function convertToClock(theTimer) if not isTimer(theTimer) then return false end local remaining = getTimerDetails(theTimer) local s = remaining/1000 --seconds from ms return string.format("%.2d:%.2d", s/60%60, s%60) end function bag.setupTimer(minutes) bag.timer = setTimer(function() bag.timer = nil end, (60*1000), 1) -- 1 min counting addEventHandler("onClientRender", root, bag.dx) end Help me :c is work perfectly no edit but in reconnect is gone ( and still in screen of other players )
  4. SkiZo

    Show Car

    Thank You i already fix it <3. your idea looks amazing Thank you
  5. SkiZo

    Show Car

    thank you.. the problem still i can't make shower car in the panel ...
  6. SkiZo

    Show Car

    i have question ... maybe change something.. i don't know what's the deffirence between local vx,vy,vz = ... and vx ,yy ,vz = ...
  7. SkiZo

    Show Car

    http://prntscr.com/jyrcsg
  8. SkiZo

    Show Car

    Thank you for helping ... but still same ERROR :c
  9. SkiZo

    Show Car

    Thanks This make it easier a lot.. Bug in setCameraMatrix.. 'vy' got nil ...
  10. SkiZo

    Show Car

    I Know that but i did not find the right fonction to create it .. it's like set camera and many things like that ! ... Help :c
  11. SkiZo

    Show Car

    Hello, .. 1 year from last post ! whatever.. i'm trying to make players see the car before buying it but i don't find the solution to create this Fonction.. i mean when player slecet a car from the list .. it's shown with rotation or something then .. Client.lua Help / مساعده carshopWindow = guiCreateWindow(500,200,290,440,"==[ Car Shop ]==",false) guiSetVisible (carshopWindow, false) guiSetAlpha(carshopWindow,1) guiWindowSetSizable(carshopWindow,false) selectLabel = guiCreateLabel(0.0423,0.1009,0.8889,0.078,"~Select your car~",true,carshopWindow) guiSetAlpha(selectLabel,1) guiLabelSetColor(selectLabel,255,255,255) guiLabelSetVerticalAlign(selectLabel,"top") guiLabelSetHorizontalAlign(selectLabel,"left",false) guiSetFont(selectLabel,"default-bold-small") carGridList = guiCreateGridList(0.0476,0.1789,0.9048,0.6789,true,carshopWindow) guiGridListSetSelectionMode(carGridList,0) carColumn = guiGridListAddColumn(carGridList,"Car",0.5) costColumn = guiGridListAddColumn(carGridList,"$",0.3) local cars = {{461,30000},{468,30000},{534,40000},{535,40000},{576,40000},{579,50000},{489,50000},{495,50000},{518,60000},{527,60000},{589,60000},{419,60000},{517,60000},{410,60000},{436,60000},{406,400000},{451,400000},{541,600000},{494,600000},{411,600000}} for i,v in ipairs (cars) do local carName = getVehicleNameFromModel (v[1]) local row = guiGridListAddRow (carGridList) guiGridListSetItemText (carGridList, row, 1, carName, false, true) guiGridListSetItemText (carGridList, row, 2, tostring(v[2]), false, true) end guiSetAlpha(carGridList,1) buyButton = guiCreateButton(0.0476,0.8624,0.7778,0.0963,"==[ Buy it ]==",true,carshopWindow) guiSetAlpha(buyButton,1) guiSetProperty(buyButton, "NormalTextColour", "FF00FF00") closeButton = guiCreateButton(0.8571,0.8624,0.0899,0.1009,"X",true,carshopWindow) guiSetProperty(closeButton, "NormalTextColour", "FFFF0000")
  12. Well, I Don't know if this the right section but anyway ... I'm trying to make Client Download some resources before The others .. i mean Download Shops.zip before anyone else . there is any idea how to do ? i heared function or smth. 'DownloadPropreites' but i don't find nothing in Wiki ! IF THERE IS NO SOLUTION .. How Can I make player ( New ) when he join ... Spawn and above of him there is marker ( to buy weapons ) anyway look when i delete files and join the game again to download etc .. spawn .. give weapons .. everything is okey .. but markers not found .. ( is acceptable to be in MAP ? included in MAP FILE )
  13. SkiZo

    dxDrawText

    Did not work ( the both of your codes but i fix it ) markers = { {1177.26, -1324.92, 14.06 }, --Hospital {2029.25, -1419.17, 16.99 }, -- Hospital {-320.21, 1055.96, 20 }, --Hospital {-2654,632,14.4 }, --Hospital {-2644.37, 633.05, 14.45 }, --Hospital {-2201.14, -2292.66, 30.63 }, --Hospital {-1514.47, 2527.25, 55.74 } --Hospital } for i, k in pairs(markers) do HospitalHeal = createMarker(k[1], k[2], k[3],"cylinder", 2, 255, 255, 0,250) end
  14. SkiZo

    dxDrawText

    i don't know about that .. but read this maybe you will understand what i mean ... --#Client --#i found this in community local alpha = 0 local r, g, b = 255, 255, 255 local size = 1.5 local typem = "cylinder" local posx, posy, posz = 1976.0625, -1251.630859375, 22.8203125 local entradaB = createMarker (posx, posy, posz, typem, size, r, g, b, alpha) addEventHandler( "onClientRender", root, function ( ) local x, y, z = getElementPosition( entradaB ) local Mx, My, Mz = getCameraMatrix( ) if ( getDistanceBetweenPoints3D( x, y, z, Mx, My, Mz ) <= 30 ) then local WorldPositionX, WorldPositionY = getScreenFromWorldPosition( x, y, z +1, 0.07 ) if ( WorldPositionX and WorldPositionY ) then dxDrawText("Entrada\nBase S.W.A.T.", WorldPositionX - 1, WorldPositionY - 1, WorldPositionX - 1, WorldPositionY - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Entrada\nBase S.W.A.T.", WorldPositionX + 1, WorldPositionY - 1, WorldPositionX + 1, WorldPositionY - 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Entrada\nBase S.W.A.T.", WorldPositionX - 1, WorldPositionY + 1, WorldPositionX - 1, WorldPositionY + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Entrada\nBase S.W.A.T.", WorldPositionX + 1, WorldPositionY + 1, WorldPositionX + 1, WorldPositionY + 1, tocolor(0, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) dxDrawText("Entrada\nBase S.W.A.T.", WorldPositionX, WorldPositionY, WorldPositionX, WorldPositionY, tocolor(255, 0, 0, 255), 1.00, "bankgothic", "center", "center", false, false, false, false, false) end end end ) This will create something like this .. So .. i'm trying to put the dx Text in the table of markers ... damn i have bad english sorry
  15. SkiZo

    dxDrawText

    So .. i'm trying to make table wich is create markers .. and put a description in the top of it .. like this #CLIENT SIDE markers = createMarker{ {1187,-1313,-13.5,"cylinder", 2, 0, 255, 255, 0}, --Hospital {2035,-1429,16.9,"cylinder", 2, 0, 255, 255, 0}, -- Hospital {-2192,-2291,30.6,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-2654,632,14.4,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-1505,2533,55.68,"cylinder", 2, 0, 255, 255, 0}, --Hospital {-326,1063,19.7,"cylinder", 2, 0, 255, 255, 0}, --Hospital {1608,1838,10.8,"cylinder", 2, 0, 255, 255, 0} --Hospital } addEventHandler ( "onClientRender", root, function ( ) local pX, pY, pZ = getElementPosition ( localPlayer ) local pedX, pedY, pedZ = getElementPosition ( markers ) local distance = getDistanceBetweenPoints3D ( pX, pY, pZ, pedX, pedY, pedZ ) if ( distance <= 12 ) then local x, y = getScreenFromWorldPosition ( pedX, pedY, pedZ ) if ( x and y ) then dxDrawText( "Free Vehicle", x, y+1.5, _, _, tocolor( 0, 255, 255, 255 ), 1, "default-bold-small", "center", "center" ) end end end ) AnyHelp ? by the way there is another script create markers .. this only create them with 0 alpha . Thanks #EDIT: Line 13 local pedX, pedY, pedZ = getElementPosition [ #markers ] But nothing
  16. SkiZo

    BotWasted

    Thank you a lot...
  17. SkiZo

    BotWasted

    Hello, so i'm trying to make Bot kills set +1 only if skin is 107 or 108 addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function ( killer ) addPlayerBossKills ( killer ) end ) So .. How i can do that ??! i have something maybe can help --# THIS IS NOT TESTED addEvent ( "onBotWasted", true ) addEventHandler ( "onBotWasted", root, function ( killer ) -- local id = getElementModel ( --[[ i don't know what bot is exactly]] ) local id = getElementModel ( Bot ) if id == 107 or id == 108 then addPlayerBossKills ( killer ) end end ) #EDIT .. change id to 107 & 108
  18. SkiZo

    Blips

    Thanks Works <3
  19. SkiZo

    Blips

    Hello, I'm trying to Create Blip Table .. Can Someone Help me ? ! #Server Side Hospital = { {1177.26, -1324.92, 14.06}, {2029.25, -1419.17, 16.99}, {1607.06, 1825.09, 10.82}, {-320.21, 1055.96, 20, -302.87}, {-2644.37, 633.05, 14.45}, {-2201.14, -2292.66, 30.63}, {-1514.47, 2527.25, 55.74} } HospitalBlips = createBlipAttachedTo ( [ #Hospital ], 22 ) setBlipVisibleDistance (HospitalBlips,200) Help
  20. SkiZo

    Dx-Timer

    Thanks You Helped me a lot <3
  21. SkiZo

    Dx-Timer

    This is Awsome .. Actually i used only Client side .. and change line 24 from minutes to 20 in server side i used only triggerClientEvent(getRootElement(), "createBagTimer", getRootElement(), minutes) Thank You A lot Bro <3 -- SOLVED
  22. SkiZo

    Dx-Timer

    Thanks .. that did not work actually .. Thanks <3 .. i noticed that .. maybe triggerServerEvent will solv that .. or two timers ... one to start next event ( will be in server side . ) the other to start DX timer .. ------- *
  23. SkiZo

    Dx-Timer

    Thanks .. that was helpful .. the timer should be in Client Side ... Because only Client side accept DX functions .. i will give you an example ( photo ) Thanks <3
  24. SkiZo

    Dx-Timer

    Hello .. So i'm trying to add timer .. dx timer .. it's suppost to be like this #Server Side. addEvent("onBotWasted",true) addEventHandler("onBotWasted",getRootElement(), function (killer) if (source == nemesilv) then destroyElement(BlipNemesislv) startCase = setTimer (createBag, (60*1000*20), 1 ) -- startdxtimer = ( i don't know what suppost to be exactly ... but it's will be triggleevent ( dx in client side always ) end end) #Client Side. --i have no idea .. )= Help please !! --it should be 20Min counting down .. Sorry but i'm so bad at Dx and specially timer
  25. is better if he need to remove ak .. search for line and add -- so the line skiped .. ( for no copy and that long .. idk x'D is just a suggestion ) function forbeed( _,aMyWeapon ) if ( aMyWeapon == 38 or aMyWeapon == 35 ) then toggleControl( source,'fire',false ) toggleControl( source,'aim_weapon',false ) outputChatBox ("#FF0000You Cannot Use This Weapon!",source, 255, 255, 255, true ) else toggleControl( source,'fire',true ) toggleControl( source,'aim_weapon',true ) end end addEventHandler( "onPlayerWeaponSwitch",root,forbeed) Use TESTED and WORK FINE .. just remove or remplace the old one ! @sami2277
×
×
  • Create New...