Jump to content

micheal1230

Members
  • Posts

    390
  • Joined

  • Last visited

Everything posted by micheal1230

  1. Use This local settehcolor = tocolor(255, 255, 255, 255) function start() addEventHandler("onClientRender", root, dxthetext) end addEventHandler("onClientResourceStart", root, start) function dxthetext() local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth 500, 300 dxDrawText("Hello World!", ax,ay,500,300,settehcolor,4) end
  2. function MyTestTextFunction () display = textCreateDisplay () -- create a new display, store the reference in a variable called display textDisplayAddObserver ( display, root ) -- add an observer to it text = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) -- create a text item textDisplayAddText ( display, text ) -- Add the text item to the text display end addEventHandler("onResourceStart", root, MyTestTextFunction) Copy That ^ Above local settehcolor = tocolor(255, 255, 255, 255) function start() addEventHandler("onClientRender", root, dxthetext) end addEventHandler("onClientResourceStart", root, start) function dxthetext() local screenWidth, screenHeight = guiGetScreenSize() local ax, ay = screenWidth 500, 300 dxDrawText("Hello World!", ax,ay,500,300,settehcolor,4) end The Script MUST Be Clientside In the meta.xml
  3. function MyTestTextFunction () display = textCreateDisplay () -- create a new display, store the reference in a variable called display textDisplayAddObserver ( display, root ) -- add an observer to it text = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) -- create a text item textDisplayAddText ( display, text ) -- Add the text item to the text display end addEventHandler("onResourceStart", root, MyTestTextFunction) Copy That ^ Above
  4. Please Use <div class="lua" id="{CB}" style="font-family: monospace;"><ol><li style="" class="li1"> </li></ol></div> instead of Code function MyTestTextFunction () display = textCreateDisplay () -- create a new display, store the reference in a variable called display textDisplayAddObserver ( display, thePlayer ) -- add an observer to it text = textCreateTextItem ( "Hello World", 0.5, 0.5, "low", 255, 0, 0, 0, 1.0 ) -- create a text item textDisplayAddText ( display, text ) -- Add the text item to the text display end addEventHandler("onResourceStart", getRootElement(), MyTestTextFunction)
  5. Well I have tried This Script I get no errors but it does'nt delete them, it justs says there are non around function clearNearbyInfo(thePlayer) if (exports.global:isPlayerAdmin(thePlayer)) then local x, y, z = getElementPosition(thePlayer) local object = nil local dist = 999999 for key, value in ipairs(exports.global:getNearbyElements(thePlayer, "infopoint")) do local objtype = getElementData(value, "type") if (objtype=="info") then local ox, oy, oz = getElementPosition(value) local distance = getDistanceBetweenPoints3D(x, y, z, ox, oy, oz) if (distance) then object = value dist = distance end end end if (object) then local id = getElementData(object, "dbid") destroyElement(object) local query = mysql:query_free("DELETE FROM infopoints WHERE id='" .. mysql:escape_string(id) .. "'") outputChatBox("Deleted infopoint with id #" .. id .. ".", thePlayer, 0, 255, 0) else outputChatBox("You are not near any infopoint.", thePlayer, 255, 0, 0) end end end addCommandHandler("delnearbyinfo", clearNearbyInfo, false, false)
  6. bad Arg outputchatbox you need the ""..pickupmessage.."" And Thanks <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 I'm insisting that it doesn't need to be like this ""..pickupmessage.."" well if its not you get bad arg for me
  7. Well There Are No Errors But It Doesnt Work client: local localPlayer = getLocalPlayer() local gas = getElementData(localPlayer, "gasmask") function cancelTearGasChoking(weaponID, localPlayer) if (weaponID==17) and (gas==1) then cancelEvent() end end addEventHandler("onClientPlayerChoke", localPlayer, cancelTearGasChoking) client: -- Copyright of Fort Carson Roleplay © -- Script By haws1290 local playerHealth = getElementHealth ( getLocalPlayer() ) local localPlayer = getLocalPlayer() function BloodonDamage( attacker, weapon, bodypart ) if ( getElementHealth(localPlayer) < 20 ) then local x, y, z = getElementPosition( localPlayer ) fxAddBlood ( x, y, z-2, 0.00000, 0.00000, 0.00000, 4, 1 ) end end addEventHandler ( "onClientPlayerDamage", localPlayer, BloodonDamage )
  8. bad Arg outputchatbox you need the ""..pickupmessage.."" And Thanks <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3 <3
  9. Boolean Value @ pickupmessage And you gotta use the ..pickupmessage.. or you get outputChatBox Bad Arg. function gettehmessage(source) local pickupmessage = getElementData( source, "Message" ) outputChatBox(""..pickupmessage..".", source) end addEventHandler("onPickupHit", root, gettehmessage)
  10. Mate I Mean The Element For The addEventHandler i cant use pickup as the element because it wont exist nor can i use source get the same error saying it doesnt exist addEventHandler("onPickupHit", pickup, gettehmessage)
  11. Well How Can I Get The Infomessage from that function?????????? you already set a element data to the pickup so easily you can get it! as you do anyway!!!!!!!!!!!! local pickupmessage = getElementData( pickup, "Message" ) Mate I Mean How Do I Get The Pickup Element From That Function Surely I Cant Just put local pickupmessage = getElementData( pickup, "Message" ) and it will find the element (pickup) automatically
  12. Well How Can I Get The Infomessage from that function??????????
  13. MAN THERE AINT NO ****ING ERRORS! you not understand outputDebugString example function test (thePlayer) local imOtherFunction = getPlayerName(thePlayer) if imOtherFunction then blablabla() end end check it : function test (thePlayer) local imOtherFunction = getPlayerName(thePlayer) outputDebugString ('imotherfunction created') if imOtherFunction then blablabla() outputDebugString ('imOtherFunction passed') end end function blablabla() outputDebugString ('passed') end Mate I Aint Got No Clue How To Make It Check It, Its Obviously Not Working WHATS THERE TO BLOODY CHECK!
  14. TAPL How Would I Use onPickupHit For The Script Would It Be addEventHandler( "onPickupHit" , getRootElement() , loadAllInfopoints )
  15. MAN THERE AINT NO ****ING ERRORS! Edit: @TAPL How Would I Use onPickupHit For The Script Would It Be addEventHandler( "onPickupHit" , getRootElement() , loadAllInfopoints )
  16. Well There Are No Errors I have been trying to get this working for ages but it still does'nt work function loadAllInfopoints(res1) -- Load current ones local result1 = mysql:query("SELECT * FROM infopoints") local count = 0 local highest = 0 if (result1) then local run1 = true while run1 do local row1 = exports.mysql:fetch_assoc(result1) if not (row1) then break end local id = tonumber(row1["id"]) local x = tonumber(row1["posx"]) local y = tonumber(row1["posy"]) local z = tonumber(row1["posz"]) local infomessage = (row1["message"]) local pickup = createPickup( x, y, z, 3, 1239, 0.1) exports.pool:allocateElement(pickup) setElementData ( pickup, "Message", infomessage ) exports['anticheat-system']:changeProtectedElementDataEx(pickup, "dbid", id, false) local pickupmessage = getElementData( pickup, "Message" ) outputChatBox("".. pickupmessage .."", source) count = count + 1 if id > highest then highest = id end end mysql:query_free("ALTER TABLE `infopoints` AUTO_INCREMENT = " .. mysql:escape_string((highest + 1))) end mysql:free_result(result1) end addEventHandler("onResourceStart", getResourceRootElement(), loadAllInfopoints)
  17. micheal1230

    Delete This!

    What should i add to make it not basic ??
  18. Well The Objects Are Invisible For Some Reason And There Are No Errors
  19. There Are No Errors local objects = { -- haws1290 createObject ( 3359, -1765.4000244141, -37.299999237061, 951.40002441406 ), createObject ( 6189, -1764.8000488281, -45, 937.20001220703 ), createObject ( 6189, -1763.1999511719, -56, 944.40002441406,360,271,270 ), createObject ( 1498, -1768.5, -41.599998474121, 951.70001220703 ) --createObject ( 3359, -1765.4000244141, -37.299999237061, 951.40002441406,0,0,0,0 ), --createObject ( 6189, -1764.8000488281, -45, 937.20001220703,0,0,0,0 ), --createObject ( 6189, -1763.1999511719, -56, 944.40002441406,0,360,271,270 ), --createObject ( 1498, -1768.5, -41.599998474121, 951.70001220703,0,0,0,0 ) } local col = createColSphere(-1768.5, -41.599998474121, 951.70001220703,100) local function watchChanges( ) if getElementDimension( getLocalPlayer( ) ) > 0 and getElementDimension( getLocalPlayer( ) ) ~= getElementDimension( objects[1] ) and getElementInterior( getLocalPlayer( ) ) == getElementInterior( objects[1] ) then for key, value in pairs( objects ) do setElementDimension( value, getElementDimension( getLocalPlayer( ) ) ) end elseif getElementDimension( getLocalPlayer( ) ) == 0 and getElementDimension( objects[1] ) ~= 65535 then for key, value in pairs( objects ) do setElementDimension( value, 65535 ) end end end addEventHandler( "onClientColShapeHit", col, function( element ) if element == getLocalPlayer( ) then addEventHandler( "onClientRender", root, watchChanges ) end end ) addEventHandler( "onClientColShapeLeave", col, function( element ) if element == getLocalPlayer( ) then removeEventHandler( "onClientRender", root, watchChanges ) end end ) -- Put them standby for now. for key, value in pairs( objects ) do setElementDimension( value, 65535 ) end
  20. lol man.. example you have 5 skin you get 5 skin you save 5 skin on elementdata you get 5 skin (elementdata) you set skin 5 to player.. save his skin in account - when player join in team then set skin (team) later if /quitteam you getAccountData - old skin and set skin (his old) Mate I mate a silly mistake, i just added 2 extra stuff
  21. Lol I Added Some Wrong Shit In These Should'nt Be Here local saveskin = getElementModel( thePlayer ) local saveoldskin = setElementData(thePlayer, "oldskin", saveskin)
  22. No Errors But It Does'nt Set You To Your Old Skin addCommandHandler("quitteam", function( thePlayer ) local saveskin = getElementModel( thePlayer ) local saveoldskin = setElementData(thePlayer, "oldskin", saveskin) local setoldskin = getElementData( thePlayer, "oldskin" ) if ( setoldskin ) then setElementModel( thePlayer, setoldskin ) outputChatBox("You Have Quit Your Current Team.", thePlayer) end end )
  23. I Dont Understand What Your Mean By Special Who It Is?
×
×
  • Create New...