Jump to content

Dimmitry007

Members
  • Posts

    145
  • Joined

  • Last visited

Everything posted by Dimmitry007

  1. function admin () if isPlayerInTeam(player, "Staff") then if ( playerName == true ) then setElementData(source,"admin",true) if ( playerTeam == false ) then setElementData(source,"admin",false) end end end addEventHandler("onPlayerChangeTeam",resourceRoot,admin) Maybe?
  2. Hahaha cool
  3. What does debug script say?
  4. function dAllC(thePlayer) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do destroyElement(getElementData(v, "parent")) destroyElement(v) outputChatBox("Cars have been deleted !",thePlayer, 255, 0, 0, false) end end end addCommandHandler("dallvehs", dAllC) Try this
  5. Yea
  6. Anyway thanks!
  7. Are u sure that ur using That file is cilent side?
  8. Can I use SetPlayerNameTagText, ("player",False) ?
  9. Hello I'm working in onduty script That show some thing says OnDuty in admin head the problem is that I want to disable it. But I don't know Here is my code function adminduty(player) giveWeapon (player,26,30) setPlayerNametagText (player,"onDuty") setPedArmor (player,100) setPedSkin (player,260) end addCommandHandler("aduty",adminduty) I want to disable it by typing off duty please help Peace!
  10. ???
  11. hmmmmm nothing changed
  12. 0.0
  13. The problem was that i add a safe zone script that is buggy
  14. Nvm i fixed the problem
  15. local screenW, screenH = guiGetScreenSize() local x, y = (screenW/1024), (screenH/768) just change that
  16. https://community.multitheftauto.com/in ... ls&id=8914
  17. HELP
  18. debug says nothing ;-;
  19. when i type duty nothing happens
  20. send me link to download it please
  21. i don't use that
  22. Not working ;(
  23. THANKS!
  24. <meta> <info name="duty" author="JACK" description="duty" version="1.0" type="script"></info> <script src="onduty2.lua" type="server"></script> <script src="3D.lua" type="server"></script> <script src="goduty.lua" type="server"></script> </meta> This should work?
  25. hello peeps i've a problem i've a script that when u type /duty u have godmode and a text on ur head i've a problem when i type /duty it's show Admin On Duty But it's not showing for other ppl so here's my code Text.lua addEvent ( "onDuty", true ) function duty() if getElementData(getLocalPlayer( ),"duty") == true then timer = setTimer ( function() setElementData(getLocalPlayer( ),"onDuty",true) local x, y, z = getElementPosition( getLocalPlayer( ) ) local playerName = getPlayerName( getLocalPlayer( ) ) local theText = dxDraw3DText( "Admin On Duty [NO DM]", x, y, z+1,05,"default",255,0,0,200) setTimer ( function() destroyElement(theText) end, 59, 1) end, 60, 0 ) else if isTimer(timer) then killTimer(timer) end setElementData(getLocalPlayer( ),"duty",true) end end addEventHandler ( "onDuty", getRootElement(), duty) addCommandHandler("duty",duty) 3dtext.lua local fonts = { [ "default" ] = true, [ "default-bold" ] = true,[ "clear" ] = true,[ "arial" ] = true,[ "sans" ] = true, [ "pricedown" ] = true, [ "bankgothic" ] = true,[ "diploma" ] = true,[ "beckett" ] = true }; function dxDraw3DText( text, x, y, z, scale, font, r, g, b, maxDistance ) assert( type( text ) == "string", "Bad argument @ dxDraw3DText" ); assert( type( x ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( y ) == "number", "Bad argument @ dxDraw3DText" ); assert( type( z ) == "number", "Bad argument @ dxDraw3DText" ); if not scale or type( scale ) ~= "number" or scale <= 0 then scale = 2 end if not font or type( font ) ~= "string" or not fonts[ font ] then font = "default" end if not r or type( r ) ~= "number" or r < 0 or r > 255 then r = 255 end if not g or type( g ) ~= "number" or g < 0 or g > 255 then g = 255 end if not b or type( b ) ~= "number" or b < 0 or b > 255 then b = 255 end if not maxDistance or type( maxDistance ) ~= "number" or maxDistance <= 1 then maxDistance = 12 end local textElement = createElement( "text" ); if textElement then setElementData( textElement, "text", text ); setElementData( textElement, "x", x ); setElementData( textElement, "y", y ); setElementData( textElement, "z", z ); setElementData( textElement, "scale", scale ); setElementData( textElement, "font", font ); setElementData( textElement, "rgba", { r, g, b, 255 } ); setElementData( textElement, "maxDistance", maxDistance ); return textElement end return false end addEventHandler( "onClientRender", root, function( ) local texts = getElementsByType( "text" ); if #texts > 0 then local pX, pY, pZ = getElementPosition( localPlayer ); for i = 1, #texts do local text = getElementData( texts[i], "text" ); local tX, tY, tZ = getElementData( texts[i], "x" ), getElementData( texts[i], "y" ), getElementData( texts[i], "z" ); local font = getElementData( texts[i], "font" ); local scale = getElementData( texts[i], "scale" ); local color = getElementData( texts[i], "rgba" ); local maxDistance = getElementData( texts[i], "maxDistance" ); if not text or not tX or not tY or not tZ then return end if not font then font = "default" end if not scale then scale = 2 end if not color or type( color ) ~= "table" then color = { 255, 255, 255, 255 }; end if not maxDistance then maxDistance = 12 end local distance = getDistanceBetweenPoints3D( pX, pY, pZ, tX, tY, tZ ); if distance <= maxDistance then local x, y = getScreenFromWorldPosition( tX, tY, tZ ); if x and y then dxDrawText( text, x, y, _, _, tocolor( color[1], color[2], color[3], color[4] ), scale, font, "center", "center" ); end end end end end ); goduty.lua function aduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is Now OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is Now OnDuty!") setElementData( player, "blood", 99999999999999999999999 ) heal = "9999999999999999999999999999" end end addCommandHandler("duty",aduty) function offaduty ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then outputChatBox(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!",getRootElement(),255,0,0) outputChatBox("",getRootElement(),255,0,0) outputServerLog(" Administrator "..getPlayerName(player).." Is No Longer OnDuty!") setElementData( player, "blood", 12000 ) end end addCommandHandler("offaduty",offduty) function heal_func ( player ) local accName = getAccountName(getPlayerAccount(player)) if isObjectInACLGroup ( "user." ..accName, aclGetGroup ( "Admin") ) then if heal == "an" then setElementData( player, "food", 250 ) setElementData( player, "thirst", 250 ) end end end setTimer(heal_func, 60000, 0) meta.xml <meta> <info name="duty" author="JACK" description="duty" version="1.0" type="script"></info> <script src="onduty2.lua" type="client"></script> <script src="3D.lua" type="client"></script> <script src="goduty.lua" type="server"></script> </meta>
×
×
  • Create New...