Jump to content

Seba500PLK

Members
  • Posts

    239
  • Joined

  • Last visited

Everything posted by Seba500PLK

  1. my bots (zombies) if is cancelEvent() they can not be to rammed
  2. https://wiki.multitheftauto.com/wiki/OnClientPedDamage The source of this event is the ped that got damaged CHECK
  3. When a player try to rammed it nothing happens. --Client function DamageToPed(attacker, weapon, bodypart, loss) cancelEvent() if weapon and attacker then if weapon == 49 then --Rammed outputChatBox("Rammed") end if bodypart == 9 then --HeadShot setElementHealth(source, 0) end end end addEventHandler("onClientPedDamage", getRootElement(), DamageToPed)
  4. maybe this function createVeh(player, commandName, model) local x, y, z = getElementPosition(player) local rx, ry, rz = getElementRotation(player) local createdVehicle = createVehicle(model, x, y, z, rx, ry, rz) if (createdVehicle == false) then outputChatBox("Error") end warpPedIntoVehicle ( player, createdVehicle ) end addCommandHandler("veh", createVeh)
  5. removeEventHandler("onClientRender", getRootElement(), renderDisplay)
  6. No, I am writing on your server for you
  7. I write to you on the server
  8. i say for you in your server
  9. paste in server marker = {} vehicleCarSpawns = { -- Format: x, y, z, rotation, "Group", {cars} {297.18, 2049.94, 34.28, 0, "Military", {596, 597, 598, 599, 579, 490, 528}}, {1523, -2847.8, 0, 180, "FBI", {472, 473, 595}} } addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i,v in ipairs ( vehicleCarSpawns ) do local x, y, z, rot, group, cars = unpack ( vehicleCarSpawns [ i ] ) marker [ i ] = createMarker ( x, y, z - 1, "cylinder", 2.3, r, g, b, 150 ) setElementData ( marker [ i ], "markerIndex", i, false ) addEventHandler ( "onMarkerHit", marker [ i ], onSpawnerMarkerHit ) end end ) function onSpawnerMarkerHit ( p ) local index = getElementData ( source, "markerIndex" ) local x, y, z, rot, group, cars = unpack ( vehicleCarSpawns [ index ] ) if ( group == exports [ 'NGGroups' ]:getPlayerGroup ( v ) ) then triggerClientEvent ( p, "showGroupVehicleSpawners", p, cars, x, y, z ) else triggerClientEvent(p,"message:centerText",p,"Your not in the "..getElementData(source,"markerType"), 5, 255, 0, 0) end end vehicle = {} function onDestroyCustomCars() if isElement(vehicle[source]) then destroyElement(vehicle[source]) vehicle[source] = nil end end addEventHandler("onPlayerQuit", root, onDestroyCustomCars) addEvent("onDestroyCustomCars",true) addEventHandler("onDestroyCustomCars",root,onDestroyCustomCars) function onCreateGroupVehicle(id,x,y,z) if (id) then if (isElement(vehicle[source])) then destroyElement(vehicle[source]) end triggerEvent("spawners:destroyOldCars",source) if (tonumber(x) ~= nil) then vehicle[source] = createVehicle(id, x, y, z, 0, 0, rot) else local rx,ry,rz = getElementPosition(source) vehicle[source] = createVehicle(id, rx, ry, rz, 0, 0, 0) end warpPedIntoVehicle(source,vehicle[source]) setElementData(vehicle[source],"vehOwner","spawners",true) setVehicleColor(vehicle[source],r,g,b) end end addEvent("onCreateGroupVehicle",true) addEventHandler("onCreateGroupVehicle",root,onCreateGroupVehicle)
  10. https://wiki.multitheftauto.com/wiki/CreateLight
  11. Seba500PLK

    help guys

    if you blinked marker will paste it instead of theMarker: local theMarker = createMarker ( -2725.056640625, 217.3232421875, 3.484375, "cylinder", 5, 0, 0, 0, 0 )
  12. Seba500PLK

    help guys

    in server side change marker arguments for this: local theMarker = createMarker ( -2725.056640625, 217.3232421875, 3.484375, "cylinder", 5, 255, 255, 0, 0 ) alpha on marker
  13. Seba500PLK

    help guys

    --Client local screenWidth,screenHeight = guiGetScreenSize() bX, bY = screenWidth/2,screenHeight/2 local scale = screenWidth/800 local scaley = screenWidth/600 local sx,sy = 300,300 sx,sy = sx*scale,sy*scaley win = { { sx/1.35, sy/2.5, sx/10.8, sx/20.8}, { sx/1.185, sy/2.5, sx/10.8, sx/20.8}, { sx/1.055, sy/2.5, sx/10.8, sx/20.8}, { sx/0.95, sy/2.5, sx/10.8, sx/20.8}, { sx/0.865, sy/2.5, sx/10.8, sx/20.8}, { sx/0.794, sy/2.5, sx/10.8, sx/20.8}, { sx/1.35, sy/2.09, sx/10.8, sx/20.8}, { sx/1.185, sy/2.09, sx/10.8, sx/20.8}, { sx/1.055, sy/2.09, sx/10.8, sx/20.8}, { sx/0.95, sy/2.09, sx/10.8, sx/20.8}, } function renderoko() items = { {"1" }, {"2" }, {"3" }, {"4" }, {"5" }, {"6" }, {"7" }, {"8" }, {"9" }, {"10" }, } for i=1,10 do dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 0, 0, 0, 150 ) ) for id,item in ipairs(items) do dxDrawText (item[1], win[id][1], win[id][2], win[id][3], win[id][4], tocolor ( 255,255,255, 255 ), 1.02, "pricedown" ) end if isMouseWithinRangeOf(win[i][1], win[i][2], win[i][3], win[i][4]) then dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 195, 195, 195, 50 ) ) end if click == i then dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 255, 0, 0, 255) ) end end end function key(button,press) if button == "mouse1" then for i=1,10 do if isMouseWithinRangeOf(win[i][1], win[i][2], win[i][3], win[i][4] ) then if click == i then click = false else click = i end else if click == i then click = false end end end if press then --Click 1 if isMouseWithinRangeOf(win[1][1], win[1][2], win[1][3], win[1][4] ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) addVehicleUpgrade ( theVehicle, 1010 ) outputChatBox("You Buy Nitro!") --Click 2 elseif isMouseWithinRangeOf(win[2][1], win[2][2], win[2][3], win[2][4] ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) addVehicleUpgrade ( theVehicle, 1087 ) outputChatBox("You Buy Hydralics!") end end end end addEventHandler ( "onClientKey", getRootElement(), key ) function isMouseWithinRangeOf(psx,psy,pssx,pssy) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*screenWidth,cy*screenHeight if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then return true,cx,cy else return false end end function VehicleInMarker(hitElement) addEventHandler("onClientRender", root, renderoko) showCursor(true,false) setCameraMatrix(-2725.86640625, 211.9232421875, 6.484375, 1.388671875, 5550.42474365234, -1850.881813049316) end addEvent( "VehicleInMarker", true ) addEventHandler( "VehicleInMarker", localPlayer, VehicleInMarker ) function VehicleLeaveMarker(hitElement) removeEventHandler("onClientRender", root, renderoko) showCursor(false) setCameraTarget ( hitElement ) end addEvent( "VehicleLeaveMarker", true ) addEventHandler( "VehicleLeaveMarker", localPlayer, VehicleLeaveMarker )
  14. Seba500PLK

    help guys

    place in map: http://screenshot.sh/m7TLiFjrMXYBm
  15. Seba500PLK

    help guys

    This Is My Example --Client local screenWidth,screenHeight = guiGetScreenSize() bX, bY = screenWidth/2,screenHeight/2 local scale = screenWidth/800 local scaley = screenWidth/600 local sx,sy = 300,300 sx,sy = sx*scale,sy*scaley win = { { sx/1.35, sy/2.5, sx/10.8, sx/20.8}, { sx/1.185, sy/2.5, sx/10.8, sx/20.8}, { sx/1.055, sy/2.5, sx/10.8, sx/20.8}, { sx/0.95, sy/2.5, sx/10.8, sx/20.8}, { sx/0.865, sy/2.5, sx/10.8, sx/20.8}, { sx/0.794, sy/2.5, sx/10.8, sx/20.8}, { sx/1.35, sy/2.09, sx/10.8, sx/20.8}, { sx/1.185, sy/2.09, sx/10.8, sx/20.8}, { sx/1.055, sy/2.09, sx/10.8, sx/20.8}, { sx/0.95, sy/2.09, sx/10.8, sx/20.8}, } function renderoko() items = { {"1" }, {"2" }, {"3" }, {"4" }, {"5" }, {"6" }, {"7" }, {"8" }, {"9" }, {"10" }, } for i=1,10 do dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 0, 0, 0, 150 ) ) for id,item in ipairs(items) do dxDrawText (item[1], win[id][1], win[id][2], win[id][3], win[id][4], tocolor ( 255,255,255, 255 ), 1.02, "pricedown" ) end if isMouseWithinRangeOf(win[i][1], win[i][2], win[i][3], win[i][4]) then dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 195, 195, 195, 50 ) ) end if click == i then dxDrawRectangle (win[i][1], win[i][2], win[i][3], win[i][4], tocolor ( 255, 0, 0, 255) ) end end end function key(button,press) if button == "mouse1" then for i=1,10 do if isMouseWithinRangeOf(win[i][1], win[i][2], win[i][3], win[i][4] ) then if click == i then click = false else click = i --outputChatBox("click") end end end if press then --Click 1 if isMouseWithinRangeOf(win[1][1], win[1][2], win[1][3], win[1][4] ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) addVehicleUpgrade ( theVehicle, 1010 ) outputChatBox("You Buy Nitro!") --Click 2 elseif isMouseWithinRangeOf(win[2][1], win[2][2], win[2][3], win[2][4] ) then local theVehicle = getPedOccupiedVehicle ( localPlayer ) addVehicleUpgrade ( theVehicle, 1087 ) outputChatBox("You Buy Hydralics!") end end end end addEventHandler ( "onClientKey", getRootElement(), key ) function isMouseWithinRangeOf(psx,psy,pssx,pssy) if not isCursorShowing() then return false end local cx,cy = getCursorPosition() cx,cy = cx*screenWidth,cy*screenHeight if cx >= psx and cx <= psx+pssx and cy >= psy and cy <= psy+pssy then return true,cx,cy else return false end end function VehicleInMarker(hitElement) addEventHandler("onClientRender", root, renderoko) showCursor(true,false) end addEvent( "VehicleInMarker", true ) addEventHandler( "VehicleInMarker", localPlayer, VehicleInMarker ) function VehicleLeaveMarker(hitElement) removeEventHandler("onClientRender", root, renderoko) showCursor(false) end addEvent( "VehicleLeaveMarker", true ) addEventHandler( "VehicleLeaveMarker", localPlayer, VehicleLeaveMarker ) --Server removeWorldModel(10575,10575,-2716.2993,217.0497,5.7050714) local theMarker = createMarker ( -2725.056640625, 217.3232421875, 3.484375, "cylinder", 5, 255, 255, 0, 170 ) function MarkerHit( hitElement, matchingDimension ) if getElementType(hitElement) == "player" and isPedInVehicle(hitElement) then triggerClientEvent ( hitElement, "VehicleInMarker", hitElement, hitElement ) else if getElementType(hitElement) == "player" and not isPedInVehicle(hitElement) then outputChatBox("You Must Car!", hitElement) end end end addEventHandler( "onMarkerHit", theMarker, MarkerHit ) function MarkerLeave( leaveElement, matchingDimension ) if getElementType(leaveElement) == "player" and isPedInVehicle(leaveElement) then triggerClientEvent ( leaveElement, "VehicleLeaveMarker", leaveElement, leaveElement ) end end addEventHandler( "onMarkerLeave", theMarker, MarkerLeave )
×
×
  • Create New...