Jump to content

MAB

Members
  • Posts

    313
  • Joined

  • Last visited

Everything posted by MAB

  1. MAB

    help

    ik how to replace a vehicle with a custom txd and dff files what about the vehicle sound? can it be replaced? can it be muted?
  2. MAB

    help

    sorry about the new topic i though u won't look at the old one again... mm,,, this is an example or the problem solution? the problem still in there... i think the resource start event should be client
  3. MAB

    help

    mm... not working... i see the setting in the settings list and i can change the value but nothing happens to the marker size even after restarting the resource.. also there is a debugscript message saying : ERROR : Server triggered clientside event receiveSettings, but event is not added clientside . meta .. "Michael" type="script" name="" description="" /> client .. local MarkerSize = -0.1 function addevent () addEvent("receiveSettings", true) end addEventHandler( "onClientResourceStart", getRootElement( ), addevent ) addEventHandler("receiveSettings", root, function(markerSize) MarkerSize = markerSize end ) --that is all u need.... Server... local markerSize = get("markerSize") triggerClientEvent("receiveSettings", root, markerSize)
  4. MAB

    help

    Oh.. Ok thank you very much you r a great helper and scripter..i wish that there r more people like u
  5. MAB

    help

    mmm.. not working... debugscript : ERROR : Server triggered clientside event receiveSettings, but event is not added clientside
  6. MAB

    help

    meta , GTX.. to edit the size from the admin panel , resources , settings
  7. MAB

    help

    how to make settings in this script.. the settings should be #MarkerSize.. should change the marker size.. i couldn't understand anything in the wiki...the marker is at line 8 --Markers effect.. function markers ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) local solt = getPedWeaponSlot ( source ) if ( solt == 0 or solt == 1 or solt == 8 or solt == 9 or solt == 10 or solt == 11 or solt == 12 or solt == 7 ) then return end -- if his weapon isn't a gun then don't do the function if isElement ( hitElement ) then -- check if there is a hitElement ( something he is hitting ) if ( getElementType ( hitElement ) == "player" or getElementType ( hitElement ) == "vehicle" ) then return end -- if he is shooting a player or a vehicle then don't make the marker , cuz no need for it end marker = createMarker ( hitX, hitY, hitZ, "corona", -0.1, 255, 255, 255, 255 ) -- when the player shoot we create a white marker in the place that the bullet hit and make it visible for the player who is shooting only. if solt == 2 then -- if he is using a handgun then setMarkerColor ( marker, 255, 0, 0, 255 ) -- set the marker colour as red end if solt == 3 then -- if he is using a shotgun then setMarkerColor ( marker, 0, 0, 255, 255 ) -- set the marker colour as blue end if solt == 4 then -- if he is using a sub machine gun then setMarkerColor ( marker, 255, 255, 0, 255 ) -- set the marker colour as yellow end if solt == 5 then -- if he is using a rifle then setMarkerColor ( marker, 255, 0, 255, 255 ) -- etc end if solt == 6 then setMarkerColor ( marker, 0, 255, 255, 255 ) end if marker then setTimer ( destroyElement,3*1000,1,marker ) end end addEventHandler ( "onClientPlayerWeaponFire", localPlayer, markers ) -- show him the markers
  8. MAB

    Questions

    no one know the rest questions?
  9. MAB

    Questions

    what is the diffrance between onClientRender and onClientPreRender ? if i made a anim window using dxCreateAnimWindow then i made a rectangle and text so if want the rectangle and the text to move with the window.. should i use setElementParent or something like that? for a dx login panel do i use. . addEventHandler ("onClientResourceStart",resourceRoot,function() addEventHandler("onClientRender",root,functionName) ?? about the arguments ()... if the () is like that createVehicle(411, x, y,z )... would it effect anything?
  10. MAB

    questions

    oh sorry .. wrong place my mistake...
  11. MAB

    questions

    what is the diffrance between onClientRender and onClientPreRender ? if i made a anim window using dxCreateAnimWindow then i made a rectangle and text so if want the rectangle and the text to move with the window.. should i use setElementParent or something like that? for a dx login panel do i use. . addEventHandler ("onClientResourceStart",resourceRoot,function() addEventHandler("onClientRender",root,functionName) ?? about the arguments ()... if the () is like that createVehicle(411, x, y,z )... would it effect anything?
  12. MAB

    question

    Didn't help
  13. MAB

    Small problem

    nvm done it with isElement(hitElement)
  14. MAB

    question

    how you make a custom crosshair
  15. MAB

    Small problem

    thx working now but there is a debug error message saying .. "23: bad argument @ 'getElementType' expected element at argument 1 got nil
  16. MAB

    Small problem

    what is the problem i see no marker and there is no messages at debugscript .. i didn't test until i finished typing the codes i can't find the problem --Markers effect.. function markers ( weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement ) if ( getPedWeaponSlot ( source ) == 0 or 1 or 8 or 9 or 10 or 11 or 12 ) then return end -- if his weapon isn't a gun then don't do the function if ( getElementType ( hitElement ) == "player" or getElementType ( hitElement ) == "vehicle" ) then return end -- if he is shooting a player then don't make the marker , cuz no need for it marker = createMarker ( hitX, hitY, hitZ, "corona", 0.1, 255, 255, 255, 255 ) -- when the player shoot we create a white marker in the place that the bullet hit and make it visible for the player who is shooting only. if getPedWeaponSlot ( source ) == 2 then -- if he is using a handgun then setMarkerColor ( marker, 255, 0, 0, 255 ) -- set the marker colour as red end if getPedWeaponSlot ( source ) == 3 then -- if he is using a shotgun then setMarkerColor ( marker, 0, 0, 255, 255 ) -- set the marker colour as blue end if getPedWeaponSlot ( source ) == 4 then -- if he is using a sub machine gun then setMarkerColor ( marker, 255, 255, 0, 255 ) -- set the marker colour as yellow end if getPedWeaponSlot ( source ) == 5 then -- if he is using a rifle then setMarkerColor ( marker, 255, 0, 255, 255 ) -- etc end if getPedWeaponSlot ( source ) == 6 then setMarkerColor ( marker, 0, 255, 255, 255 ) end if getPedWeaponSlot ( source ) == 7 then setMarkerColor ( marker, 0, 0, 255, 255 ) end if marker then setTimer ( destroyElement,3*1000,1,marker ) end end addEventHandler ( "onClientPlayerWeaponFire", root, markers )
  17. MAB

    problem

    u want that function to happen to all players?
  18. MAB

    problem

    not working... no debug messages.. no explosion or effect happens... showCursor works but idk about the events function start() showCursor(true) addEventHandler("onClientClick",localPlayer,explosion) end addCommandHandler("ilovetoburn",start) function explosion (button,state,a,b,x,y,z) if (button == "left" and state == "down") then createExplosion (x,y,z,1,true,-2,true) createEffect ("teargas",x,y,z) end end function stop() showCursor(false) removeEventHandler("onClientClick",localPlayer,explosion) end addCommandHandler("ihatetoburn",stop)
  19. attempt to call global 'createEffect' function start(player) if ( hasObjectPermissionTo ( player, "function.kickPlayer", false ) ) then showCursor(player,true,true) addEventHandler("onPlayerClick",player,explosion) end end addCommandHandler("ilovetoburn",start) function explosion (button,state,element,x,y,z) if (button == "left" and state == "down") then createExplosion (x,y,z,1) createEffect ("teargas",x,y,z) end end function stop(player) if ( hasObjectPermissionTo ( player, "function.kickPlayer", false ) ) then showCursor(player,false,false) removeEventHandler("onPlayerClick",player,explosion) end end addCommandHandler("ihatetoburn",stop)
  20. MAB

    help

    but it isn;t about onClientRender
  21. MAB

    help

    You've to check if the player who hitting marker is a localPlayer. Example: function MarkerHit(hitPlayer,matchingDimension) if( hitPlayer == localPlayer ) then guiSetVisible (windowname,true) showCursor (true) end end addEventHandler ("onClientMarkerHit",Marker,MarkerHit) What marker?!
  22. MAB

    help

    explosion doesn't get created... i want to create explosion in the place that the player click on... function onClientPlayerWeaponFireFunc(player) showCursor(player,true,false) addEventHandler("onPlayerClick",player,explosion) end addCommandHandler("ilovetoburn",onClientPlayerWeaponFireFunc) function explosion (button,state,a,b,x,y,z) if (button == "left" and state == "down") then createExplosion (x,y,z,1) showCursor(source,false,false) end end
  23. MAB

    help

    help the button is not working... sx,sy = guiGetScreenSize() x,y = (sx/1280),(sy/768) function edit () color2 = tocolor(255,255,255,255) dxDrawText("Close", x*756, y*522, x*870, y*552, color2, 1.30, "pricedown", "left", "top", false, false, false, false, false) addEventHandler( "onClientRender", root, edit ) function join ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if ( absoluteX == x*870 and absoluteY == y*552 ) then if ( button == "left" and state == "up" ) then showCursor(false) removeEventHandler("onClientRender", root, edit) end end end addEventHandler ( "onClientClick", root, join )
  24. MAB

    help

    LOL i mean for all players or one player?! i tried addEventHandler("onClientRender,player,function) but didn't work
  25. MAB

    help

    is addEventHandler("onClientRender",root,anyfunction) makes a DX things visible for all players in the server and when using removeEventHandler will make them invisible for all players who see them?!
×
×
  • Create New...